Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/sharedRuntime.cpp @ 4007:23a1c8de9d51
Merge
author | dholmes |
---|---|
date | Mon, 17 Oct 2011 01:40:27 -0400 |
parents | ec5ce9326985 436b4a3231bf |
children | 2ec638646e86 |
comparison
equal
deleted
inserted
replaced
4004:11d17c7d2ee6 | 4007:23a1c8de9d51 |
---|---|
146 } | 146 } |
147 | 147 |
148 | 148 |
149 #include <math.h> | 149 #include <math.h> |
150 | 150 |
151 #ifndef USDT2 | |
151 HS_DTRACE_PROBE_DECL4(hotspot, object__alloc, Thread*, char*, int, size_t); | 152 HS_DTRACE_PROBE_DECL4(hotspot, object__alloc, Thread*, char*, int, size_t); |
152 HS_DTRACE_PROBE_DECL7(hotspot, method__entry, int, | 153 HS_DTRACE_PROBE_DECL7(hotspot, method__entry, int, |
153 char*, int, char*, int, char*, int); | 154 char*, int, char*, int, char*, int); |
154 HS_DTRACE_PROBE_DECL7(hotspot, method__return, int, | 155 HS_DTRACE_PROBE_DECL7(hotspot, method__return, int, |
155 char*, int, char*, int, char*, int); | 156 char*, int, char*, int, char*, int); |
157 #endif /* !USDT2 */ | |
156 | 158 |
157 // Implementation of SharedRuntime | 159 // Implementation of SharedRuntime |
158 | 160 |
159 #ifndef PRODUCT | 161 #ifndef PRODUCT |
160 // For statistics | 162 // For statistics |
957 int SharedRuntime::dtrace_object_alloc_base(Thread* thread, oopDesc* o) { | 959 int SharedRuntime::dtrace_object_alloc_base(Thread* thread, oopDesc* o) { |
958 assert(DTraceAllocProbes, "wrong call"); | 960 assert(DTraceAllocProbes, "wrong call"); |
959 Klass* klass = o->blueprint(); | 961 Klass* klass = o->blueprint(); |
960 int size = o->size(); | 962 int size = o->size(); |
961 Symbol* name = klass->name(); | 963 Symbol* name = klass->name(); |
964 #ifndef USDT2 | |
962 HS_DTRACE_PROBE4(hotspot, object__alloc, get_java_tid(thread), | 965 HS_DTRACE_PROBE4(hotspot, object__alloc, get_java_tid(thread), |
963 name->bytes(), name->utf8_length(), size * HeapWordSize); | 966 name->bytes(), name->utf8_length(), size * HeapWordSize); |
967 #else /* USDT2 */ | |
968 HOTSPOT_OBJECT_ALLOC( | |
969 get_java_tid(thread), | |
970 (char *) name->bytes(), name->utf8_length(), size * HeapWordSize); | |
971 #endif /* USDT2 */ | |
964 return 0; | 972 return 0; |
965 } | 973 } |
966 | 974 |
967 JRT_LEAF(int, SharedRuntime::dtrace_method_entry( | 975 JRT_LEAF(int, SharedRuntime::dtrace_method_entry( |
968 JavaThread* thread, methodOopDesc* method)) | 976 JavaThread* thread, methodOopDesc* method)) |
969 assert(DTraceMethodProbes, "wrong call"); | 977 assert(DTraceMethodProbes, "wrong call"); |
970 Symbol* kname = method->klass_name(); | 978 Symbol* kname = method->klass_name(); |
971 Symbol* name = method->name(); | 979 Symbol* name = method->name(); |
972 Symbol* sig = method->signature(); | 980 Symbol* sig = method->signature(); |
981 #ifndef USDT2 | |
973 HS_DTRACE_PROBE7(hotspot, method__entry, get_java_tid(thread), | 982 HS_DTRACE_PROBE7(hotspot, method__entry, get_java_tid(thread), |
974 kname->bytes(), kname->utf8_length(), | 983 kname->bytes(), kname->utf8_length(), |
975 name->bytes(), name->utf8_length(), | 984 name->bytes(), name->utf8_length(), |
976 sig->bytes(), sig->utf8_length()); | 985 sig->bytes(), sig->utf8_length()); |
986 #else /* USDT2 */ | |
987 HOTSPOT_METHOD_ENTRY( | |
988 get_java_tid(thread), | |
989 (char *) kname->bytes(), kname->utf8_length(), | |
990 (char *) name->bytes(), name->utf8_length(), | |
991 (char *) sig->bytes(), sig->utf8_length()); | |
992 #endif /* USDT2 */ | |
977 return 0; | 993 return 0; |
978 JRT_END | 994 JRT_END |
979 | 995 |
980 JRT_LEAF(int, SharedRuntime::dtrace_method_exit( | 996 JRT_LEAF(int, SharedRuntime::dtrace_method_exit( |
981 JavaThread* thread, methodOopDesc* method)) | 997 JavaThread* thread, methodOopDesc* method)) |
982 assert(DTraceMethodProbes, "wrong call"); | 998 assert(DTraceMethodProbes, "wrong call"); |
983 Symbol* kname = method->klass_name(); | 999 Symbol* kname = method->klass_name(); |
984 Symbol* name = method->name(); | 1000 Symbol* name = method->name(); |
985 Symbol* sig = method->signature(); | 1001 Symbol* sig = method->signature(); |
1002 #ifndef USDT2 | |
986 HS_DTRACE_PROBE7(hotspot, method__return, get_java_tid(thread), | 1003 HS_DTRACE_PROBE7(hotspot, method__return, get_java_tid(thread), |
987 kname->bytes(), kname->utf8_length(), | 1004 kname->bytes(), kname->utf8_length(), |
988 name->bytes(), name->utf8_length(), | 1005 name->bytes(), name->utf8_length(), |
989 sig->bytes(), sig->utf8_length()); | 1006 sig->bytes(), sig->utf8_length()); |
1007 #else /* USDT2 */ | |
1008 HOTSPOT_METHOD_RETURN( | |
1009 get_java_tid(thread), | |
1010 (char *) kname->bytes(), kname->utf8_length(), | |
1011 (char *) name->bytes(), name->utf8_length(), | |
1012 (char *) sig->bytes(), sig->utf8_length()); | |
1013 #endif /* USDT2 */ | |
990 return 0; | 1014 return 0; |
991 JRT_END | 1015 JRT_END |
992 | 1016 |
993 | 1017 |
994 // Finds receiver, CallInfo (i.e. receiver method), and calling bytecode) | 1018 // Finds receiver, CallInfo (i.e. receiver method), and calling bytecode) |