<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 18pt; color: rgb(0, 0, 0);" class="elementToProof">
Hello,</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 18pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 18pt; color: rgb(0, 0, 0);" class="elementToProof">
The ExecutionSample event will only sample code that is running Java code. The NativeMethodSample event will sample both running and blocked code in native code. See the descriptions of the events:</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 18pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 18pt; color: rgb(0, 0, 0);" class="elementToProof">
<a class="OWAAutoLink" id="OWA3ec4c3f0-dc1e-7940-9e56-6524d61bf52e" href="https://github.com/openjdk/jdk/blob/e6ac956a7ac613b916c0dbfda7e57856c1b8a83c/src/hotspot/share/jfr/metadata/metadata.xml#L951">https://github.com/openjdk/jdk/blob/e6ac956a7ac613b916c0dbfda7e57856c1b8a83c/src/hotspot/share/jfr/metadata/metadata.xml#L951</a></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 18pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 18pt; color: rgb(0, 0, 0);" class="elementToProof">
The JEP text is confusing, and we are working on an improved version.</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 18pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 18pt; color: rgb(0, 0, 0);" class="elementToProof">
Erik</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 18pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> hotspot-jfr-dev <hotspot-jfr-dev-retn@openjdk.org> on behalf of Milan Mimica <milan.mimica@gmail.com><br>
<b>Sent:</b> Wednesday, July 23, 2025 9:41 AM<br>
<b>To:</b> hotspot-jfr-dev@openjdk.org <hotspot-jfr-dev@openjdk.org><br>
<b>Subject:</b> Question about JEP 509 and thread state</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hello</div>
<div><br>
</div>
<div>I have always assumed that JFR thread sampler will ignore threads that are blocked on socket read, but the description on <a href="https://openjdk.org/jeps/509">https://openjdk.org/jeps/509</a> states that this is exactly the problem that the JEP 509 aims
to resolve. </div>
<div><br>
</div>
<div>So my question is specifically about JfrSamplerThread::sample_java_thread/sample_native_thread. These explicitly skip sampling unless the thread state is _thread_in_Java/ _thread_in_native. Which state is a thread in while blocked on socket read? I assumed
it was _thread_blocked.</div>
<div><br>
</div>
<div><br>
</div>
<span class="x_gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="x_gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Milan Mimica<br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>