Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/sharedRuntime.cpp @ 14380:e6195383bcaf
8034080: Remove the USDT1 dtrace code from Hotspot
Reviewed-by: dholmes, coleenp
author | sla |
---|---|
date | Tue, 18 Feb 2014 09:15:40 +0100 |
parents | 63a4eb8bcd23 |
children | 28f281e8de1d |
comparison
equal
deleted
inserted
replaced
14379:c66479743828 | 14380:e6195383bcaf |
---|---|
125 #endif // COMPILER2 | 125 #endif // COMPILER2 |
126 } | 126 } |
127 | 127 |
128 #include <math.h> | 128 #include <math.h> |
129 | 129 |
130 #ifndef USDT2 | |
131 HS_DTRACE_PROBE_DECL4(hotspot, object__alloc, Thread*, char*, int, size_t); | |
132 HS_DTRACE_PROBE_DECL7(hotspot, method__entry, int, | |
133 char*, int, char*, int, char*, int); | |
134 HS_DTRACE_PROBE_DECL7(hotspot, method__return, int, | |
135 char*, int, char*, int, char*, int); | |
136 #endif /* !USDT2 */ | |
137 | |
138 // Implementation of SharedRuntime | 130 // Implementation of SharedRuntime |
139 | 131 |
140 #ifndef PRODUCT | 132 #ifndef PRODUCT |
141 // For statistics | 133 // For statistics |
142 int SharedRuntime::_ic_miss_ctr = 0; | 134 int SharedRuntime::_ic_miss_ctr = 0; |
967 int SharedRuntime::dtrace_object_alloc_base(Thread* thread, oopDesc* o) { | 959 int SharedRuntime::dtrace_object_alloc_base(Thread* thread, oopDesc* o) { |
968 assert(DTraceAllocProbes, "wrong call"); | 960 assert(DTraceAllocProbes, "wrong call"); |
969 Klass* klass = o->klass(); | 961 Klass* klass = o->klass(); |
970 int size = o->size(); | 962 int size = o->size(); |
971 Symbol* name = klass->name(); | 963 Symbol* name = klass->name(); |
972 #ifndef USDT2 | |
973 HS_DTRACE_PROBE4(hotspot, object__alloc, get_java_tid(thread), | |
974 name->bytes(), name->utf8_length(), size * HeapWordSize); | |
975 #else /* USDT2 */ | |
976 HOTSPOT_OBJECT_ALLOC( | 964 HOTSPOT_OBJECT_ALLOC( |
977 get_java_tid(thread), | 965 get_java_tid(thread), |
978 (char *) name->bytes(), name->utf8_length(), size * HeapWordSize); | 966 (char *) name->bytes(), name->utf8_length(), size * HeapWordSize); |
979 #endif /* USDT2 */ | |
980 return 0; | 967 return 0; |
981 } | 968 } |
982 | 969 |
983 JRT_LEAF(int, SharedRuntime::dtrace_method_entry( | 970 JRT_LEAF(int, SharedRuntime::dtrace_method_entry( |
984 JavaThread* thread, Method* method)) | 971 JavaThread* thread, Method* method)) |
985 assert(DTraceMethodProbes, "wrong call"); | 972 assert(DTraceMethodProbes, "wrong call"); |
986 Symbol* kname = method->klass_name(); | 973 Symbol* kname = method->klass_name(); |
987 Symbol* name = method->name(); | 974 Symbol* name = method->name(); |
988 Symbol* sig = method->signature(); | 975 Symbol* sig = method->signature(); |
989 #ifndef USDT2 | |
990 HS_DTRACE_PROBE7(hotspot, method__entry, get_java_tid(thread), | |
991 kname->bytes(), kname->utf8_length(), | |
992 name->bytes(), name->utf8_length(), | |
993 sig->bytes(), sig->utf8_length()); | |
994 #else /* USDT2 */ | |
995 HOTSPOT_METHOD_ENTRY( | 976 HOTSPOT_METHOD_ENTRY( |
996 get_java_tid(thread), | 977 get_java_tid(thread), |
997 (char *) kname->bytes(), kname->utf8_length(), | 978 (char *) kname->bytes(), kname->utf8_length(), |
998 (char *) name->bytes(), name->utf8_length(), | 979 (char *) name->bytes(), name->utf8_length(), |
999 (char *) sig->bytes(), sig->utf8_length()); | 980 (char *) sig->bytes(), sig->utf8_length()); |
1000 #endif /* USDT2 */ | |
1001 return 0; | 981 return 0; |
1002 JRT_END | 982 JRT_END |
1003 | 983 |
1004 JRT_LEAF(int, SharedRuntime::dtrace_method_exit( | 984 JRT_LEAF(int, SharedRuntime::dtrace_method_exit( |
1005 JavaThread* thread, Method* method)) | 985 JavaThread* thread, Method* method)) |
1006 assert(DTraceMethodProbes, "wrong call"); | 986 assert(DTraceMethodProbes, "wrong call"); |
1007 Symbol* kname = method->klass_name(); | 987 Symbol* kname = method->klass_name(); |
1008 Symbol* name = method->name(); | 988 Symbol* name = method->name(); |
1009 Symbol* sig = method->signature(); | 989 Symbol* sig = method->signature(); |
1010 #ifndef USDT2 | |
1011 HS_DTRACE_PROBE7(hotspot, method__return, get_java_tid(thread), | |
1012 kname->bytes(), kname->utf8_length(), | |
1013 name->bytes(), name->utf8_length(), | |
1014 sig->bytes(), sig->utf8_length()); | |
1015 #else /* USDT2 */ | |
1016 HOTSPOT_METHOD_RETURN( | 990 HOTSPOT_METHOD_RETURN( |
1017 get_java_tid(thread), | 991 get_java_tid(thread), |
1018 (char *) kname->bytes(), kname->utf8_length(), | 992 (char *) kname->bytes(), kname->utf8_length(), |
1019 (char *) name->bytes(), name->utf8_length(), | 993 (char *) name->bytes(), name->utf8_length(), |
1020 (char *) sig->bytes(), sig->utf8_length()); | 994 (char *) sig->bytes(), sig->utf8_length()); |
1021 #endif /* USDT2 */ | |
1022 return 0; | 995 return 0; |
1023 JRT_END | 996 JRT_END |
1024 | 997 |
1025 | 998 |
1026 // Finds receiver, CallInfo (i.e. receiver method), and calling bytecode) | 999 // Finds receiver, CallInfo (i.e. receiver method), and calling bytecode) |