RFR: JDK-8289524: Add JFR JIT restart event [v3]
Erik Gahlin
egahlin at openjdk.org
Thu Jul 14 17:17:17 UTC 2022
On Thu, 14 Jul 2022 14:26:01 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> The JIT compiler restarts (see restart_compiler in NMethodSweeper::sweep_code_cache) would be a helpful addition to the JFR events. Currently we log the JIT stop operations in JFR (EventCodeCacheFull) but no restart.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> Bring back JitRestart event, add codeCacheMaxCapacity
src/hotspot/share/code/codeCache.cpp line 1369:
> 1367: event.set_unallocatedCapacity(heap->unallocated_capacity());
> 1368: event.set_fullCount(heap->full_count());
> 1369: event.set_codeCacheMaxCapacity(CodeCache::max_capacity());
Add test of field in TestCodeCacheFull
src/hotspot/share/jfr/metadata/metadata.xml line 561:
> 559: </Event>
> 560:
> 561: <Event name="JitRestart" category="Java Virtual Machine, Compiler" label="JIT restart" stackTrace="false" startTime="false" thread="true">
"JITRestart" . The convention for other events have been to use capital laters for acronyms.
"JIT restart" -> "JIT Restart"
src/hotspot/share/jfr/metadata/metadata.xml line 563:
> 561: <Event name="JitRestart" category="Java Virtual Machine, Compiler" label="JIT restart" stackTrace="false" startTime="false" thread="true">
> 562: <Field type="int" name="freedMemory" label="Freed Memory" />
> 563: <Field type="ulong" name="codeCacheMaxCapacity" label="CodeCache maximum capacity" />
Should be "Code Cache Maximum Capacity"
src/hotspot/share/jfr/metadata/metadata.xml line 620:
> 618: <Field type="ulong" contentType="bytes" name="unallocatedCapacity" label="Unallocated" />
> 619: <Field type="int" name="fullCount" label="Full Count" />
> 620: <Field type="ulong" name="codeCacheMaxCapacity" label="CodeCache maximum capacity" />
Should be "Code Cache Maximum Capacity"
src/hotspot/share/runtime/sweeper.cpp line 440:
> 438: log.debug("restart compiler");
> 439: log_sweep("restart_compiler");
> 440: EventJitRestart event;
It would be good to have a sanity test of the event.
If the event can't be provoked reliably, retry or accept as OK.
-------------
PR: https://git.openjdk.org/jdk/pull/9334
More information about the hotspot-dev
mailing list