Mercurial > hg > graal-jvmci-8
comparison src/share/vm/code/nmethod.cpp @ 4006:436b4a3231bf
7098194: integrate macosx-port changes
Summary: Integrate bsd-port/hotspot and macosx-port/hotspot changes as of 2011.09.29.
Reviewed-by: kvn, dholmes, never, phh
Contributed-by: Christos Zoulas <christos@zoulas.com>, Greg Lewis <glewis@eyesbeyond.com>, Kurt Miller <kurt@intricatesoftware.com>, Alexander Strange <astrange@apple.com>, Mike Swingler <swingler@apple.com>, Roger Hoover <rhoover@apple.com>, Victor Hernandez <vhernandez@apple.com>, Pratik Solanki <psolanki@apple.com>
author | dcubed |
---|---|
date | Thu, 13 Oct 2011 09:35:42 -0700 |
parents | c124e2e7463e |
children | 04b9a2566eec aa3d708d67c4 |
comparison
equal
deleted
inserted
replaced
4005:2ef3386478e6 | 4006:436b4a3231bf |
---|---|
48 | 48 |
49 #ifdef DTRACE_ENABLED | 49 #ifdef DTRACE_ENABLED |
50 | 50 |
51 // Only bother with this argument setup if dtrace is available | 51 // Only bother with this argument setup if dtrace is available |
52 | 52 |
53 #ifndef USDT2 | |
53 HS_DTRACE_PROBE_DECL8(hotspot, compiled__method__load, | 54 HS_DTRACE_PROBE_DECL8(hotspot, compiled__method__load, |
54 const char*, int, const char*, int, const char*, int, void*, size_t); | 55 const char*, int, const char*, int, const char*, int, void*, size_t); |
55 | 56 |
56 HS_DTRACE_PROBE_DECL6(hotspot, compiled__method__unload, | 57 HS_DTRACE_PROBE_DECL6(hotspot, compiled__method__unload, |
57 char*, int, char*, int, char*, int); | 58 char*, int, char*, int, char*, int); |
67 klass_name->bytes(), klass_name->utf8_length(), \ | 68 klass_name->bytes(), klass_name->utf8_length(), \ |
68 name->bytes(), name->utf8_length(), \ | 69 name->bytes(), name->utf8_length(), \ |
69 signature->bytes(), signature->utf8_length()); \ | 70 signature->bytes(), signature->utf8_length()); \ |
70 } \ | 71 } \ |
71 } | 72 } |
73 #else /* USDT2 */ | |
74 #define DTRACE_METHOD_UNLOAD_PROBE(method) \ | |
75 { \ | |
76 methodOop m = (method); \ | |
77 if (m != NULL) { \ | |
78 Symbol* klass_name = m->klass_name(); \ | |
79 Symbol* name = m->name(); \ | |
80 Symbol* signature = m->signature(); \ | |
81 HOTSPOT_COMPILED_METHOD_UNLOAD( \ | |
82 (char *) klass_name->bytes(), klass_name->utf8_length(), \ | |
83 (char *) name->bytes(), name->utf8_length(), \ | |
84 (char *) signature->bytes(), signature->utf8_length()); \ | |
85 } \ | |
86 } | |
87 #endif /* USDT2 */ | |
72 | 88 |
73 #else // ndef DTRACE_ENABLED | 89 #else // ndef DTRACE_ENABLED |
74 | 90 |
75 #define DTRACE_METHOD_UNLOAD_PROBE(method) | 91 #define DTRACE_METHOD_UNLOAD_PROBE(method) |
76 | 92 |
1471 // new method for install_code() path | 1487 // new method for install_code() path |
1472 // Transfer information from compilation to jvmti | 1488 // Transfer information from compilation to jvmti |
1473 void nmethod::post_compiled_method_load_event() { | 1489 void nmethod::post_compiled_method_load_event() { |
1474 | 1490 |
1475 methodOop moop = method(); | 1491 methodOop moop = method(); |
1492 #ifndef USDT2 | |
1476 HS_DTRACE_PROBE8(hotspot, compiled__method__load, | 1493 HS_DTRACE_PROBE8(hotspot, compiled__method__load, |
1477 moop->klass_name()->bytes(), | 1494 moop->klass_name()->bytes(), |
1478 moop->klass_name()->utf8_length(), | 1495 moop->klass_name()->utf8_length(), |
1479 moop->name()->bytes(), | 1496 moop->name()->bytes(), |
1480 moop->name()->utf8_length(), | 1497 moop->name()->utf8_length(), |
1481 moop->signature()->bytes(), | 1498 moop->signature()->bytes(), |
1482 moop->signature()->utf8_length(), | 1499 moop->signature()->utf8_length(), |
1483 insts_begin(), insts_size()); | 1500 insts_begin(), insts_size()); |
1501 #else /* USDT2 */ | |
1502 HOTSPOT_COMPILED_METHOD_LOAD( | |
1503 (char *) moop->klass_name()->bytes(), | |
1504 moop->klass_name()->utf8_length(), | |
1505 (char *) moop->name()->bytes(), | |
1506 moop->name()->utf8_length(), | |
1507 (char *) moop->signature()->bytes(), | |
1508 moop->signature()->utf8_length(), | |
1509 insts_begin(), insts_size()); | |
1510 #endif /* USDT2 */ | |
1484 | 1511 |
1485 if (JvmtiExport::should_post_compiled_method_load() || | 1512 if (JvmtiExport::should_post_compiled_method_load() || |
1486 JvmtiExport::should_post_compiled_method_unload()) { | 1513 JvmtiExport::should_post_compiled_method_unload()) { |
1487 get_and_cache_jmethod_id(); | 1514 get_and_cache_jmethod_id(); |
1488 } | 1515 } |