RFR: 8342818: Implement CPU Time Profiling for JFR [v4]
Markus Grönlund
mgronlun at openjdk.org
Fri Nov 1 14:26:40 UTC 2024
On Wed, 30 Oct 2024 19:34:23 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:
>> This is the code for the [JEP draft: CPU Time based profiling for JFR].
>
> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove min_valid_free_size_bytes
src/hotspot/share/jfr/recorder/stacktrace/jfrAsyncStackTrace.cpp line 116:
> 114: return false;
> 115: }
> 116: const traceid mid = JfrTraceId::load(frame._method);
This is JfrTraceId::load() barrier code:
inline traceid JfrTraceIdLoadBarrier::load(const Klass* klass, const Method* method) {
assert(klass != nullptr, "invariant");
assert(method != nullptr, "invariant");
if (should_tag(method)) {
SET_METHOD_AND_CLASS_USED_THIS_EPOCH(klass);
SET_METHOD_FLAG_USED_THIS_EPOCH(method);
assert(METHOD_AND_CLASS_USED_THIS_EPOCH(klass), "invariant");
assert(METHOD_FLAG_USED_THIS_EPOCH(method), "invariant");
enqueue(klass);
JfrTraceIdEpoch::set_changed_tag_state();
}
return (METHOD_ID(klass, method));
}
What happens if the sampler crashes at one of these routines?
1. Sets bits in the Klass, but not in the Method, and does not enqueue?
2. Set bits in the Klass and Method, but does not enqueue?
3. Sets bits in Klass, Method and enqueues, but does not notify?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1825879231
More information about the hotspot-dev
mailing list