Skip to content

8361175: JFR: Document differences between method sample events #26132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/hotspot/share/jfr/metadata/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -948,22 +948,24 @@
<Field type="long" contentType="bytes" name="freeSize" label="Free Size" description="Free swap space" />
</Event>

<Event name="ExecutionSample" category="Java Virtual Machine, Profiling" label="Method Profiling Sample" description="Snapshot of a threads state"
<Event name="ExecutionSample" category="Java Virtual Machine, Profiling" label="Java Execution Sample"
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."
period="everyChunk">
<Field type="Thread" name="sampledThread" label="Thread" />
<Field type="StackTrace" name="stackTrace" label="Stack Trace" />
<Field type="ThreadState" name="state" label="Thread State" />
</Event>

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

<Event name="CPUTimeSample" category="Java Virtual Machine, Profiling" label="CPU Time Method Sample"
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."
<Event name="CPUTimeSample" category="Java Virtual Machine, Profiling" label="CPU Time Sample"
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."
throttle="true" thread="false" experimental="true" startTime="false">
<Field type="StackTrace" name="stackTrace" label="Stack Trace" />
<Field type="Thread" name="eventThread" label="Thread" />
Expand All @@ -972,7 +974,7 @@
<Field type="boolean" name="biased" label="Biased" description="The sample is safepoint-biased" />
</Event>

<Event name="CPUTimeSamplesLost" category="Java Virtual Machine, Profiling" label="CPU Time Method Profiling Lost Samples" description="Records that the CPU time sampler lost samples"
<Event name="CPUTimeSamplesLost" category="Java Virtual Machine, Profiling" label="CPU Time Samples Lost" description="Records that the CPU time sampler lost samples"
thread="false" stackTrace="false" startTime="false" experimental="true">
<Field type="int" name="lostSamples" label="Lost Samples" />
<Field type="Thread" name="eventThread" label="Thread" />
Expand Down
10 changes: 5 additions & 5 deletions src/jdk.jfr/share/classes/jdk/jfr/internal/query/view.ini
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ form = "SELECT LAST(initialSize), LAST(minSize), LAST(maxSize),
FROM GCHeapConfiguration"

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

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

[environment.network-utilization]
label = "Network Utilization"
Expand Down