This commit is contained in:
David Holmes 2011-10-17 01:40:27 -04:00
commit c45d65f8eb
71 changed files with 8299 additions and 226 deletions

View file

@ -148,11 +148,13 @@ void SharedRuntime::generate_ricochet_blob() {
#include <math.h>
#ifndef USDT2
HS_DTRACE_PROBE_DECL4(hotspot, object__alloc, Thread*, char*, int, size_t);
HS_DTRACE_PROBE_DECL7(hotspot, method__entry, int,
char*, int, char*, int, char*, int);
HS_DTRACE_PROBE_DECL7(hotspot, method__return, int,
char*, int, char*, int, char*, int);
#endif /* !USDT2 */
// Implementation of SharedRuntime
@ -959,8 +961,14 @@ int SharedRuntime::dtrace_object_alloc_base(Thread* thread, oopDesc* o) {
Klass* klass = o->blueprint();
int size = o->size();
Symbol* name = klass->name();
#ifndef USDT2
HS_DTRACE_PROBE4(hotspot, object__alloc, get_java_tid(thread),
name->bytes(), name->utf8_length(), size * HeapWordSize);
#else /* USDT2 */
HOTSPOT_OBJECT_ALLOC(
get_java_tid(thread),
(char *) name->bytes(), name->utf8_length(), size * HeapWordSize);
#endif /* USDT2 */
return 0;
}
@ -970,10 +978,18 @@ JRT_LEAF(int, SharedRuntime::dtrace_method_entry(
Symbol* kname = method->klass_name();
Symbol* name = method->name();
Symbol* sig = method->signature();
#ifndef USDT2
HS_DTRACE_PROBE7(hotspot, method__entry, get_java_tid(thread),
kname->bytes(), kname->utf8_length(),
name->bytes(), name->utf8_length(),
sig->bytes(), sig->utf8_length());
#else /* USDT2 */
HOTSPOT_METHOD_ENTRY(
get_java_tid(thread),
(char *) kname->bytes(), kname->utf8_length(),
(char *) name->bytes(), name->utf8_length(),
(char *) sig->bytes(), sig->utf8_length());
#endif /* USDT2 */
return 0;
JRT_END
@ -983,10 +999,18 @@ JRT_LEAF(int, SharedRuntime::dtrace_method_exit(
Symbol* kname = method->klass_name();
Symbol* name = method->name();
Symbol* sig = method->signature();
#ifndef USDT2
HS_DTRACE_PROBE7(hotspot, method__return, get_java_tid(thread),
kname->bytes(), kname->utf8_length(),
name->bytes(), name->utf8_length(),
sig->bytes(), sig->utf8_length());
#else /* USDT2 */
HOTSPOT_METHOD_RETURN(
get_java_tid(thread),
(char *) kname->bytes(), kname->utf8_length(),
(char *) name->bytes(), name->utf8_length(),
(char *) sig->bytes(), sig->utf8_length());
#endif /* USDT2 */
return 0;
JRT_END