src/share/vm/gc_implementation/g1/heapRegionType.cpp

Thu, 14 Jun 2018 09:15:08 -0700

author
kevinw
date
Thu, 14 Jun 2018 09:15:08 -0700
changeset 9327
f96fcd9e1e1b
parent 7195
c02ec279b062
child 9861
a248d0be1309
permissions
-rw-r--r--

8081202: Hotspot compile warning: "Invalid suffix on literal; C++11 requires a space between literal and identifier"
Summary: Need to add a space between macro identifier and string literal
Reviewed-by: bpittore, stefank, dholmes, kbarrett

brutisso@7195 1 /*
brutisso@7195 2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
brutisso@7195 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
brutisso@7195 4 *
brutisso@7195 5 * This code is free software; you can redistribute it and/or modify it
brutisso@7195 6 * under the terms of the GNU General Public License version 2 only, as
brutisso@7195 7 * published by the Free Software Foundation.
brutisso@7195 8 *
brutisso@7195 9 * This code is distributed in the hope that it will be useful, but WITHOUT
brutisso@7195 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
brutisso@7195 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
brutisso@7195 12 * version 2 for more details (a copy is included in the LICENSE file that
brutisso@7195 13 * accompanied this code).
brutisso@7195 14 *
brutisso@7195 15 * You should have received a copy of the GNU General Public License version
brutisso@7195 16 * 2 along with this work; if not, write to the Free Software Foundation,
brutisso@7195 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
brutisso@7195 18 *
brutisso@7195 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
brutisso@7195 20 * or visit www.oracle.com if you need additional information or have any
brutisso@7195 21 * questions.
brutisso@7195 22 *
brutisso@7195 23 */
brutisso@7195 24
brutisso@7195 25 #include "precompiled.hpp"
brutisso@7195 26 #include "gc_implementation/g1/heapRegionType.hpp"
brutisso@7195 27
brutisso@7195 28 bool HeapRegionType::is_valid(Tag tag) {
brutisso@7195 29 switch (tag) {
brutisso@7195 30 case FreeTag:
brutisso@7195 31 case EdenTag:
brutisso@7195 32 case SurvTag:
brutisso@7195 33 case HumStartsTag:
brutisso@7195 34 case HumContTag:
brutisso@7195 35 case OldTag:
brutisso@7195 36 return true;
brutisso@7195 37 }
brutisso@7195 38 return false;
brutisso@7195 39 }
brutisso@7195 40
brutisso@7195 41 const char* HeapRegionType::get_str() const {
brutisso@7195 42 hrt_assert_is_valid(_tag);
brutisso@7195 43 switch (_tag) {
brutisso@7195 44 case FreeTag: return "FREE";
brutisso@7195 45 case EdenTag: return "EDEN";
brutisso@7195 46 case SurvTag: return "SURV";
brutisso@7195 47 case HumStartsTag: return "HUMS";
brutisso@7195 48 case HumContTag: return "HUMC";
brutisso@7195 49 case OldTag: return "OLD";
brutisso@7195 50 }
brutisso@7195 51 ShouldNotReachHere();
brutisso@7195 52 // keep some compilers happy
brutisso@7195 53 return NULL;
brutisso@7195 54 }
brutisso@7195 55
brutisso@7195 56 const char* HeapRegionType::get_short_str() const {
brutisso@7195 57 hrt_assert_is_valid(_tag);
brutisso@7195 58 switch (_tag) {
brutisso@7195 59 case FreeTag: return "F";
brutisso@7195 60 case EdenTag: return "E";
brutisso@7195 61 case SurvTag: return "S";
brutisso@7195 62 case HumStartsTag: return "HS";
brutisso@7195 63 case HumContTag: return "HC";
brutisso@7195 64 case OldTag: return "O";
brutisso@7195 65 }
brutisso@7195 66 ShouldNotReachHere();
brutisso@7195 67 // keep some compilers happy
brutisso@7195 68 return NULL;
brutisso@7195 69 }

mercurial