# HG changeset patch # User mgronlun # Date 1567509327 -7200 # Node ID 6fa0074508ef75a81881e91bbae979e8b49a9b80 # Parent 23e3cd901cb618fcd6e46d5e3a8f6f3bba42a424 hide leakp tagging of klass diff -r 23e3cd901cb6 -r 6fa0074508ef src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.cpp --- a/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.cpp Tue Sep 03 11:48:31 2019 +0200 +++ b/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.cpp Tue Sep 03 13:15:27 2019 +0200 @@ -308,8 +308,7 @@ if (is_processed(method_id) || is_klass_unloaded(method_id)) { return; } - assert(frame._method != NULL, "invariant"); - JfrTraceId::set_leakp(frame._method->method_holder(), frame._method); + JfrTraceId::set_leakp(frame._method); } void ObjectSampleCheckpoint::write_stacktrace(const JfrStackTrace* trace, JfrCheckpointWriter& writer) { diff -r 23e3cd901cb6 -r 6fa0074508ef src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp --- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp Tue Sep 03 11:48:31 2019 +0200 +++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp Tue Sep 03 13:15:27 2019 +0200 @@ -99,7 +99,7 @@ static traceid use(const ClassLoaderData* cld); // leak profiler - static void set_leakp(const Klass* klass, const Method* method); + static void set_leakp(const Method* method); static void remove(const Klass* klass); static void restore(const Klass* klass); diff -r 23e3cd901cb6 -r 6fa0074508ef src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp --- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp Tue Sep 03 11:48:31 2019 +0200 +++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp Tue Sep 03 13:15:27 2019 +0200 @@ -108,7 +108,10 @@ return cld->is_unsafe_anonymous() ? 0 : set_used_and_get(cld); } -inline void JfrTraceId::set_leakp(const Klass* klass, const Method* method) { +inline void JfrTraceId::set_leakp(const Method* method) { + assert(method != NULL, "invariant"); + const Klass* const klass = method->method_holder(); + assert(klass != NULL, "invariant"); assert(METHOD_AND_CLASS_USED_THIS_EPOCH(klass), "invariant"); assert(METHOD_FLAG_USED_THIS_EPOCH(method), "invariant"); SET_LEAKP(klass);