Skip to content

Commit

Permalink
8295419: JFR: Change name of jdk.JitRestart
Browse files Browse the repository at this point in the history
Reviewed-by: mgronlun
  • Loading branch information
egahlin committed Oct 18, 2022
1 parent 95baf83 commit ecfb6bc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/share/code/codeCache.cpp
Expand Up @@ -990,7 +990,7 @@ void CodeCache::flush_unlinked_nmethods() {
if (!CompileBroker::should_compile_new_jobs() && freed_memory != 0) {
CompileBroker::set_should_compile_new_jobs(CompileBroker::run_compilation);
log_info(codecache)("Restarting compiler");
EventJitRestart event;
EventJITRestart event;
event.set_freedMemory(freed_memory);
event.set_codeCacheMaxCapacity(CodeCache::max_capacity());
event.commit();
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/jfr/metadata/metadata.xml
Expand Up @@ -566,7 +566,7 @@
<Field type="ulong" contentType="bytes" name="used" label="Used" />
</Event>

<Event name="JitRestart" category="Java Virtual Machine, Compiler" label="JIT Restart" stackTrace="false" startTime="false" thread="true">
<Event name="JITRestart" category="Java Virtual Machine, Compiler" label="JIT Restart" stackTrace="false" startTime="false" thread="true">
<Field type="ulong" contentType="bytes" name="freedMemory" label="Freed Memory" />
<Field type="ulong" contentType="bytes" name="codeCacheMaxCapacity" label="Code Cache Maximum Capacity" />
</Event>
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jfr/share/conf/jfr/default.jfc
Expand Up @@ -540,7 +540,7 @@
<setting name="enabled" control="compiler-enabled-failure">false</setting>
</event>

<event name="jdk.JitRestart">
<event name="jdk.JITRestart">
<setting name="enabled" control="compiler-enabled">true</setting>
</event>

Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jfr/share/conf/jfr/profile.jfc
Expand Up @@ -540,7 +540,7 @@
<setting name="enabled" control="compiler-enabled-failure">false</setting>
</event>

<event name="jdk.JitRestart">
<event name="jdk.JITRestart">
<setting name="enabled" control="compiler-enabled">true</setting>
</event>

Expand Down
4 changes: 2 additions & 2 deletions test/jdk/jdk/jfr/event/compiler/TestJitRestart.java
Expand Up @@ -68,7 +68,7 @@ private static boolean testWithBlobType(BlobType btype, long availableSize) thro
Recording r = new Recording();
r.enable(EventNames.CodeCacheFull);
r.enable(EventNames.Compilation);
r.enable(EventNames.JitRestart);
r.enable(EventNames.JITRestart);
r.start();
long addr = WHITE_BOX.allocateCodeBlob(availableSize, btype.id);
WHITE_BOX.freeCodeBlob(addr);
Expand All @@ -91,7 +91,7 @@ private static boolean testWithBlobType(BlobType btype, long availableSize) thro
if (evt.getEventType().getName().equals("jdk.Compilation") && !compilationCanHappen) {
return false;
}
if (evt.getEventType().getName().equals("jdk.JitRestart")) {
if (evt.getEventType().getName().equals("jdk.JITRestart")) {
System.out.println("--> jdk.JitRestart found");
Events.assertField(evt, "codeCacheMaxCapacity").notEqual(0L);
Events.assertField(evt, "freedMemory").notEqual(0L);
Expand Down
2 changes: 1 addition & 1 deletion test/lib/jdk/test/lib/jfr/EventNames.java
Expand Up @@ -162,7 +162,7 @@ public class EventNames {
public static final String ObjectAllocationOutsideTLAB = PREFIX + "ObjectAllocationOutsideTLAB";
public static final String ObjectAllocationSample = PREFIX + "ObjectAllocationSample";
public static final String Deoptimization = PREFIX + "Deoptimization";
public static final String JitRestart = PREFIX + "JitRestart";
public static final String JITRestart = PREFIX + "JITRestart";

// OS
public static final String OSInformation = PREFIX + "OSInformation";
Expand Down

3 comments on commit ecfb6bc

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MBaesken
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on ecfb6bc Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MBaesken Could not automatically backport ecfb6bce to openjdk/jdk17u-dev due to conflicts in the following files:

  • src/hotspot/share/code/codeCache.cpp
  • src/hotspot/share/jfr/metadata/metadata.xml
  • test/jdk/jdk/jfr/event/compiler/TestJitRestart.java
  • test/lib/jdk/test/lib/jfr/EventNames.java

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk17u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk17u-dev master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b MBaesken-backport-ecfb6bce

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk ecfb6bce5a9878d7bedce47da60f96fa9146acf7

# Backport the commit
$ git cherry-pick --no-commit ecfb6bce5a9878d7bedce47da60f96fa9146acf7
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport ecfb6bce5a9878d7bedce47da60f96fa9146acf7'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk17u-dev with the title Backport ecfb6bce5a9878d7bedce47da60f96fa9146acf7.

Please sign in to comment.