mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8173361: various crashes in JvmtiExport::post_compiled_method_load
Don't post information that uses metadata from unloaded nmethods Reviewed-by: eosterlund, dholmes, sspitsyn
This commit is contained in:
parent
67e0f3b490
commit
b1d915ef80
9 changed files with 87 additions and 24 deletions
|
@ -1565,14 +1565,18 @@ void nmethod::flush_dependencies(bool delete_immediately) {
|
|||
// Transfer information from compilation to jvmti
|
||||
void nmethod::post_compiled_method_load_event() {
|
||||
|
||||
Method* moop = method();
|
||||
// This is a bad time for a safepoint. We don't want
|
||||
// this nmethod to get unloaded while we're queueing the event.
|
||||
NoSafepointVerifier nsv;
|
||||
|
||||
Method* m = method();
|
||||
HOTSPOT_COMPILED_METHOD_LOAD(
|
||||
(char *) moop->klass_name()->bytes(),
|
||||
moop->klass_name()->utf8_length(),
|
||||
(char *) moop->name()->bytes(),
|
||||
moop->name()->utf8_length(),
|
||||
(char *) moop->signature()->bytes(),
|
||||
moop->signature()->utf8_length(),
|
||||
(char *) m->klass_name()->bytes(),
|
||||
m->klass_name()->utf8_length(),
|
||||
(char *) m->name()->bytes(),
|
||||
m->name()->utf8_length(),
|
||||
(char *) m->signature()->bytes(),
|
||||
m->signature()->utf8_length(),
|
||||
insts_begin(), insts_size());
|
||||
|
||||
if (JvmtiExport::should_post_compiled_method_load() ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue