Fri, 05 Oct 2012 18:57:10 -0700
7177003: C1: LogCompilation support
Summary: add LogCompilation support in C1 - both client and tiered mode.
Reviewed-by: twisti, kvn
duke@435 | 1 | /* |
coleenp@4037 | 2 | * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
duke@435 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 4 | * |
duke@435 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@435 | 6 | * under the terms of the GNU General Public License version 2 only, as |
duke@435 | 7 | * published by the Free Software Foundation. |
duke@435 | 8 | * |
duke@435 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 13 | * accompanied this code). |
duke@435 | 14 | * |
duke@435 | 15 | * You should have received a copy of the GNU General Public License version |
duke@435 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 18 | * |
trims@1907 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 20 | * or visit www.oracle.com if you need additional information or have any |
trims@1907 | 21 | * questions. |
duke@435 | 22 | * |
duke@435 | 23 | */ |
duke@435 | 24 | |
stefank@2314 | 25 | #include "precompiled.hpp" |
stefank@2314 | 26 | #include "utilities/constantTag.hpp" |
duke@435 | 27 | |
duke@435 | 28 | #ifndef PRODUCT |
duke@435 | 29 | |
duke@435 | 30 | void constantTag::print_on(outputStream* st) const { |
jrose@1957 | 31 | st->print(internal_name()); |
jrose@1957 | 32 | } |
jrose@1957 | 33 | |
jrose@1957 | 34 | #endif // PRODUCT |
jrose@1957 | 35 | |
jrose@1957 | 36 | BasicType constantTag::basic_type() const { |
duke@435 | 37 | switch (_tag) { |
jrose@1957 | 38 | case JVM_CONSTANT_Integer : |
jrose@1957 | 39 | return T_INT; |
jrose@1957 | 40 | case JVM_CONSTANT_Float : |
jrose@1957 | 41 | return T_FLOAT; |
jrose@1957 | 42 | case JVM_CONSTANT_Long : |
jrose@1957 | 43 | return T_LONG; |
jrose@1957 | 44 | case JVM_CONSTANT_Double : |
jrose@1957 | 45 | return T_DOUBLE; |
jrose@1957 | 46 | |
duke@435 | 47 | case JVM_CONSTANT_Class : |
duke@435 | 48 | case JVM_CONSTANT_String : |
duke@435 | 49 | case JVM_CONSTANT_UnresolvedClass : |
jrose@1957 | 50 | case JVM_CONSTANT_UnresolvedClassInError : |
duke@435 | 51 | case JVM_CONSTANT_ClassIndex : |
duke@435 | 52 | case JVM_CONSTANT_StringIndex : |
jrose@1957 | 53 | case JVM_CONSTANT_MethodHandle : |
jrose@1957 | 54 | case JVM_CONSTANT_MethodType : |
jrose@1957 | 55 | case JVM_CONSTANT_Object : |
jrose@1957 | 56 | return T_OBJECT; |
duke@435 | 57 | default: |
duke@435 | 58 | ShouldNotReachHere(); |
jrose@1957 | 59 | return T_ILLEGAL; |
duke@435 | 60 | } |
duke@435 | 61 | } |
duke@435 | 62 | |
jrose@1957 | 63 | |
jrose@1957 | 64 | |
jrose@1957 | 65 | const char* constantTag::internal_name() const { |
jrose@1957 | 66 | switch (_tag) { |
jrose@1957 | 67 | case JVM_CONSTANT_Invalid : |
jrose@1957 | 68 | return "Invalid index"; |
jrose@1957 | 69 | case JVM_CONSTANT_Class : |
jrose@1957 | 70 | return "Class"; |
jrose@1957 | 71 | case JVM_CONSTANT_Fieldref : |
jrose@1957 | 72 | return "Field"; |
jrose@1957 | 73 | case JVM_CONSTANT_Methodref : |
jrose@1957 | 74 | return "Method"; |
jrose@1957 | 75 | case JVM_CONSTANT_InterfaceMethodref : |
jrose@1957 | 76 | return "InterfaceMethod"; |
jrose@1957 | 77 | case JVM_CONSTANT_String : |
jrose@1957 | 78 | return "String"; |
jrose@1957 | 79 | case JVM_CONSTANT_Integer : |
jrose@1957 | 80 | return "Integer"; |
jrose@1957 | 81 | case JVM_CONSTANT_Float : |
jrose@1957 | 82 | return "Float"; |
jrose@1957 | 83 | case JVM_CONSTANT_Long : |
jrose@1957 | 84 | return "Long"; |
jrose@1957 | 85 | case JVM_CONSTANT_Double : |
jrose@1957 | 86 | return "Double"; |
jrose@1957 | 87 | case JVM_CONSTANT_NameAndType : |
jrose@1957 | 88 | return "NameAndType"; |
jrose@1957 | 89 | case JVM_CONSTANT_MethodHandle : |
jrose@1957 | 90 | return "MethodHandle"; |
coleenp@4037 | 91 | case JVM_CONSTANT_MethodHandleInError : |
coleenp@4037 | 92 | return "MethodHandle Error"; |
jrose@1957 | 93 | case JVM_CONSTANT_MethodType : |
jrose@1957 | 94 | return "MethodType"; |
coleenp@4037 | 95 | case JVM_CONSTANT_MethodTypeInError : |
coleenp@4037 | 96 | return "MethodType Error"; |
jrose@2015 | 97 | case JVM_CONSTANT_InvokeDynamic : |
jrose@2015 | 98 | return "InvokeDynamic"; |
jrose@1957 | 99 | case JVM_CONSTANT_Object : |
jrose@1957 | 100 | return "Object"; |
jrose@1957 | 101 | case JVM_CONSTANT_Utf8 : |
jrose@1957 | 102 | return "Utf8"; |
jrose@1957 | 103 | case JVM_CONSTANT_UnresolvedClass : |
jrose@1957 | 104 | return "Unresolved Class"; |
jrose@1957 | 105 | case JVM_CONSTANT_UnresolvedClassInError : |
jrose@1957 | 106 | return "Unresolved Class Error"; |
jrose@1957 | 107 | case JVM_CONSTANT_ClassIndex : |
jrose@1957 | 108 | return "Unresolved Class Index"; |
jrose@1957 | 109 | case JVM_CONSTANT_StringIndex : |
jrose@1957 | 110 | return "Unresolved String Index"; |
jrose@1957 | 111 | default: |
jrose@1957 | 112 | ShouldNotReachHere(); |
jrose@1957 | 113 | return "Illegal"; |
jrose@1957 | 114 | } |
jrose@1957 | 115 | } |