Skip to content

Commit 63e08d4

Browse files
committed
8361175: JFR: Document differences between method sample events
Reviewed-by: mgronlun
1 parent 5c67e3d commit 63e08d4

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -948,22 +948,24 @@
948948
<Field type="long" contentType="bytes" name="freeSize" label="Free Size" description="Free swap space" />
949949
</Event>
950950

951-
<Event name="ExecutionSample" category="Java Virtual Machine, Profiling" label="Method Profiling Sample" description="Snapshot of a threads state"
951+
<Event name="ExecutionSample" category="Java Virtual Machine, Profiling" label="Java Execution Sample"
952+
description="Snapshot of a thread executing Java code. Threads that are not executing Java code, including those waiting or executing native code, are not included."
952953
period="everyChunk">
953954
<Field type="Thread" name="sampledThread" label="Thread" />
954955
<Field type="StackTrace" name="stackTrace" label="Stack Trace" />
955956
<Field type="ThreadState" name="state" label="Thread State" />
956957
</Event>
957958

958-
<Event name="NativeMethodSample" category="Java Virtual Machine, Profiling" label="Method Profiling Sample Native" description="Snapshot of a threads state when in native"
959+
<Event name="NativeMethodSample" category="Java Virtual Machine, Profiling" label="Native Sample"
960+
description="Snapshot of a thread in native code, executing or waiting. Threads that are executing Java code are not included."
959961
period="everyChunk">
960962
<Field type="Thread" name="sampledThread" label="Thread" />
961963
<Field type="StackTrace" name="stackTrace" label="Stack Trace" />
962964
<Field type="ThreadState" name="state" label="Thread State" />
963965
</Event>
964966

965-
<Event name="CPUTimeSample" category="Java Virtual Machine, Profiling" label="CPU Time Method Sample"
966-
description="Snapshot of a threads state from the CPU time sampler. The throttle can be either an upper bound for the event emission rate, e.g. 100/s, or the cpu-time period, e.g. 10ms, with s, ms, us and ns supported as time units."
967+
<Event name="CPUTimeSample" category="Java Virtual Machine, Profiling" label="CPU Time Sample"
968+
description="Snapshot of a threads state from the CPU time sampler, both threads executing native and Java code are included. The throttle setting can be either an upper bound for the event emission rate, e.g. 100/s, or the cpu-time period, e.g. 10ms, with s, ms, us and ns supported as time units."
967969
throttle="true" thread="false" experimental="true" startTime="false">
968970
<Field type="StackTrace" name="stackTrace" label="Stack Trace" />
969971
<Field type="Thread" name="eventThread" label="Thread" />
@@ -972,7 +974,7 @@
972974
<Field type="boolean" name="biased" label="Biased" description="The sample is safepoint-biased" />
973975
</Event>
974976

975-
<Event name="CPUTimeSamplesLost" category="Java Virtual Machine, Profiling" label="CPU Time Method Profiling Lost Samples" description="Records that the CPU time sampler lost samples"
977+
<Event name="CPUTimeSamplesLost" category="Java Virtual Machine, Profiling" label="CPU Time Samples Lost" description="Records that the CPU time sampler lost samples"
976978
thread="false" stackTrace="false" startTime="false" experimental="true">
977979
<Field type="int" name="lostSamples" label="Lost Samples" />
978980
<Field type="Thread" name="eventThread" label="Thread" />

src/jdk.jfr/share/classes/jdk/jfr/internal/query/view.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ form = "SELECT LAST(initialSize), LAST(minSize), LAST(maxSize),
395395
FROM GCHeapConfiguration"
396396

397397
[application.hot-methods]
398-
label = "Java Methods that Executes the Most"
398+
label = "Java Methods that Execute the Most"
399399
table = "COLUMN 'Method', 'Samples', 'Percent'
400400
FORMAT none, none, normalized
401401
SELECT stackTrace.topFrame AS T, COUNT(*), COUNT(*)
@@ -518,10 +518,10 @@ table = "COLUMN 'Memory Type', 'First Observed', 'Average', 'Last Observed', 'Ma
518518

519519
[application.native-methods]
520520
label = "Waiting or Executing Native Methods"
521-
table = "COLUMN 'Method', 'Samples', 'Percent'
522-
FORMAT none, none, normalized
523-
SELECT stackTrace.topFrame AS T, COUNT(*), COUNT(*)
524-
FROM NativeMethodSample GROUP BY T"
521+
table = "COLUMN 'Method', 'Samples'
522+
FORMAT none, none
523+
SELECT stackTrace.topFrame AS T, COUNT(*) AS C
524+
FROM NativeMethodSample GROUP BY T ORDER BY C DESC"
525525

526526
[environment.network-utilization]
527527
label = "Network Utilization"

0 commit comments

Comments
 (0)