Skip to content

Commit

Permalink
8298255: JFR provide information about dynamization of number of comp…
Browse files Browse the repository at this point in the history
…iler threads

Reviewed-by: stuefe, mgronlun, egahlin
  • Loading branch information
MBaesken committed Dec 8, 2022
1 parent e555d54 commit fc52f21
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/hotspot/share/jfr/metadata/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@
<Event name="CompilerConfiguration" category="Java Virtual Machine, Compiler" label="Compiler Configuration" thread="false" period="endChunk" startTime="false">
<Field type="int" name="threadCount" label="Thread Count" />
<Field type="boolean" name="tieredCompilation" label="Tiered Compilation" />
<Field type="boolean" name="dynamicCompilerThreadCount" label="Uses Dynamic Number of Compiler Threads" />
</Event>

<Event name="CodeCacheStatistics" category="Java Virtual Machine, Code Cache" label="Code Cache Statistics" thread="false" period="everyChunk" startTime="false">
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/jfr/periodic/jfrPeriodic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ TRACE_REQUEST_FUNC(CompilerConfiguration) {
EventCompilerConfiguration event;
event.set_threadCount(CICompilerCount);
event.set_tieredCompilation(TieredCompilation);
event.set_dynamicCompilerThreadCount(UseDynamicNumberOfCompilerThreads);
event.commit();
}

Expand Down
3 changes: 2 additions & 1 deletion test/jdk/jdk/jfr/event/compiler/TestCompilerConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -52,6 +52,7 @@ public static void main(String[] args) throws Exception {
System.out.println("Event:" + event);
Events.assertField(event, "threadCount").atLeast(0);
Events.assertField(event, "tieredCompilation");
Events.assertField(event, "dynamicCompilerThreadCount");
}
}
}
8 changes: 4 additions & 4 deletions test/jdk/jdk/jfr/event/metadata/TestEventMetadata.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -98,7 +98,7 @@ public static void main(String[] args) throws Exception {
Set<String> eventNames= new HashSet<>();
for (EventType eventType : eventTypes) {
verifyEventType(eventType);
verifyValueDesscriptors(eventType.getFields(), types);
verifyValueDescriptors(eventType.getFields(), types);
System.out.println();
String eventName = eventType.getName();
if (eventNames.contains(eventName)) {
Expand All @@ -116,11 +116,11 @@ public static void main(String[] args) throws Exception {
}
}

private static void verifyValueDesscriptors(List<ValueDescriptor> fields, Set<String> visitedTypes) {
private static void verifyValueDescriptors(List<ValueDescriptor> fields, Set<String> visitedTypes) {
for (ValueDescriptor v : fields) {
if (!visitedTypes.contains(v.getTypeName())) {
visitedTypes.add(v.getTypeName());
verifyValueDesscriptors(v.getFields(), visitedTypes);
verifyValueDescriptors(v.getFields(), visitedTypes);
}
verifyValueDescriptor(v);
}
Expand Down

1 comment on commit fc52f21

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.