Skip to content

Commit fc52f21

Browse files
committed
8298255: JFR provide information about dynamization of number of compiler threads
Reviewed-by: stuefe, mgronlun, egahlin
1 parent e555d54 commit fc52f21

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/hotspot/share/jfr/metadata/metadata.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,7 @@
937937
<Event name="CompilerConfiguration" category="Java Virtual Machine, Compiler" label="Compiler Configuration" thread="false" period="endChunk" startTime="false">
938938
<Field type="int" name="threadCount" label="Thread Count" />
939939
<Field type="boolean" name="tieredCompilation" label="Tiered Compilation" />
940+
<Field type="boolean" name="dynamicCompilerThreadCount" label="Uses Dynamic Number of Compiler Threads" />
940941
</Event>
941942

942943
<Event name="CodeCacheStatistics" category="Java Virtual Machine, Code Cache" label="Code Cache Statistics" thread="false" period="everyChunk" startTime="false">

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ TRACE_REQUEST_FUNC(CompilerConfiguration) {
588588
EventCompilerConfiguration event;
589589
event.set_threadCount(CICompilerCount);
590590
event.set_tieredCompilation(TieredCompilation);
591+
event.set_dynamicCompilerThreadCount(UseDynamicNumberOfCompilerThreads);
591592
event.commit();
592593
}
593594

test/jdk/jdk/jfr/event/compiler/TestCompilerConfig.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -52,6 +52,7 @@ public static void main(String[] args) throws Exception {
5252
System.out.println("Event:" + event);
5353
Events.assertField(event, "threadCount").atLeast(0);
5454
Events.assertField(event, "tieredCompilation");
55+
Events.assertField(event, "dynamicCompilerThreadCount");
5556
}
5657
}
5758
}

test/jdk/jdk/jfr/event/metadata/TestEventMetadata.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -98,7 +98,7 @@ public static void main(String[] args) throws Exception {
9898
Set<String> eventNames= new HashSet<>();
9999
for (EventType eventType : eventTypes) {
100100
verifyEventType(eventType);
101-
verifyValueDesscriptors(eventType.getFields(), types);
101+
verifyValueDescriptors(eventType.getFields(), types);
102102
System.out.println();
103103
String eventName = eventType.getName();
104104
if (eventNames.contains(eventName)) {
@@ -116,11 +116,11 @@ public static void main(String[] args) throws Exception {
116116
}
117117
}
118118

119-
private static void verifyValueDesscriptors(List<ValueDescriptor> fields, Set<String> visitedTypes) {
119+
private static void verifyValueDescriptors(List<ValueDescriptor> fields, Set<String> visitedTypes) {
120120
for (ValueDescriptor v : fields) {
121121
if (!visitedTypes.contains(v.getTypeName())) {
122122
visitedTypes.add(v.getTypeName());
123-
verifyValueDesscriptors(v.getFields(), visitedTypes);
123+
verifyValueDescriptors(v.getFields(), visitedTypes);
124124
}
125125
verifyValueDescriptor(v);
126126
}

0 commit comments

Comments
 (0)