mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8159666: Better CDS support for Event-based tracing
Reviewed-by: jiangli, mgronlun
This commit is contained in:
parent
a52192d206
commit
79377a1bf1
3 changed files with 11 additions and 1 deletions
|
@ -1961,6 +1961,11 @@ void InstanceKlass::remove_unshareable_info() {
|
|||
m->remove_unshareable_info();
|
||||
}
|
||||
|
||||
// cached_class_file might be pointing to a malloc'ed buffer allocated by
|
||||
// event-based tracing code at CDS dump time. It's not usable at runtime
|
||||
// so let's clear it.
|
||||
set_cached_class_file(NULL);
|
||||
|
||||
// do array classes also.
|
||||
array_klasses_do(remove_unshareable_in_class);
|
||||
}
|
||||
|
|
|
@ -482,6 +482,7 @@ void Klass::oops_do(OopClosure* cl) {
|
|||
|
||||
void Klass::remove_unshareable_info() {
|
||||
assert (DumpSharedSpaces, "only called for DumpSharedSpaces");
|
||||
TRACE_REMOVE_KLASS_ID(this);
|
||||
|
||||
set_subklass(NULL);
|
||||
set_next_sibling(NULL);
|
||||
|
@ -494,7 +495,8 @@ void Klass::remove_unshareable_info() {
|
|||
}
|
||||
|
||||
void Klass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS) {
|
||||
TRACE_INIT_KLASS_ID(this);
|
||||
TRACE_RESTORE_KLASS_ID(this);
|
||||
|
||||
// If an exception happened during CDS restore, some of these fields may already be
|
||||
// set. We leave the class on the CLD list, even if incomplete so that we don't
|
||||
// modify the CLD list outside a safepoint.
|
||||
|
|
|
@ -33,6 +33,9 @@ typedef u8 traceid;
|
|||
#define TRACE_KLASS_DEFINITION(k, t)
|
||||
|
||||
#define TRACE_INIT_KLASS_ID(k)
|
||||
#define TRACE_REMOVE_KLASS_ID(k)
|
||||
#define TRACE_RESTORE_KLASS_ID(k)
|
||||
|
||||
#define TRACE_INIT_MODULE_ID(m)
|
||||
#define TRACE_INIT_PACKAGE_ID(p)
|
||||
#define TRACE_INIT_THREAD_ID(td)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue