RFR: 8258414: OldObjectSample events too expensive [v2]
Markus Grönlund
mgronlun at openjdk.java.net
Thu Mar 11 10:59:12 UTC 2021
On Thu, 11 Mar 2021 10:42:46 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
>> src/hotspot/share/jfr/recorder/stacktrace/jfrStackTraceRepository.cpp line 223:
>>
>>> 221:
>>> 222: // invariant is that the entry to be resolved actually exists in the table
>>> 223: const JfrStackTrace* JfrStackTraceRepository::lookup(unsigned int hash, traceid id) {
>>
>> Could the comment be extended to make it explicit that the lookup will be done only in the leak profiler stacktrace repo? Or, better yet the method renamed to `lookup_in_leak_profiler()` (but it might be too long ...).
>
> Thanks, Jaroslav - yes, indeed.
I also attempted to have the artefact tagging happen lazily, e.g. methods and classes, making it a part of the stack trace resolution process. There is a problem with that approach concerning class unloading because a referenced class can unload, but since it does not yet have the proper tag, the framework does not intercept it. I elaborated on setting an "interest" tag to handle this, but that approach opens additional challenges related to visibility and concurrency. Hard problem to solve; I was unable to do it (yet).
-------------
PR: https://git.openjdk.java.net/jdk/pull/2780
More information about the hotspot-jfr-dev
mailing list