<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Thanks for the clarification, Erik.<br>
<br>
<br>
<div class="moz-cite-prefix">On 14/06/2023 09:44, Erik Gahlin wrote:<br>
</div>
<blockquote type="cite"
cite="mid:DS7PR10MB5118B0DB786FAE7245BE71D09D5AA@DS7PR10MB5118.namprd10.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hi Frederic, </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I didn't see your post until now, I was on vacation last week..</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; background: var(--neutralPrimarySurface);
color: rgb(0, 0, 0);"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; background: var(--neutralPrimarySurface);
color: rgb(0, 0, 0);">Yes, Long.MIN_VALUE has special meaning,
It means the value is missing or not applicable.</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; background: var(--neutralPrimarySurface);
color: rgb(0, 0, 0);"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; background: var(--neutralPrimarySurface);
color: rgb(0, 0, 0);">Erik</span></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
hotspot-jfr-dev <a class="moz-txt-link-rfc2396E" href="mailto:hotspot-jfr-dev-retn@openjdk.org"><hotspot-jfr-dev-retn@openjdk.org></a> on
behalf of Frederic Thevenet <a class="moz-txt-link-rfc2396E" href="mailto:fthevene@redhat.com"><fthevene@redhat.com></a><br>
<b>Sent:</b> Tuesday, June 6, 2023 9:56 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:hotspot-jfr-dev@openjdk.org">hotspot-jfr-dev@openjdk.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:hotspot-jfr-dev@openjdk.org"><hotspot-jfr-dev@openjdk.org></a><br>
<b>Subject:</b> Field maxSize of event
jdk.YoungGenerationConfiguration can be set to Long.MIN_VALUE</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span
style="font-size:11pt;">
<div class="PlainText">Hi,<br>
<br>
I recently reported on an issue where invoking the command
"jfr print" <br>
on a recording that contain events where one of the field
in is an <br>
amount in bytes whose value is Long.MIN_VALUE (or invoking
"toString()" <br>
on such an event), you'd the following error:<br>
jfr print: unexpected internal error, Index -1 out of
bounds for length 6<br>
<br>
Now, I believe the root cause and fix to the issue to be
pretty trivial <br>
and I submitted a PR for that, but I am trying to
understand if the <br>
event that revealed the bug is really supposed to report
such a value, <br>
or if there's another problem at play here.<br>
<br>
The event type in question is
"jdk.YoungGenerationConfiguration" whose <br>
"maxSize" field is always equal to Long.MIN_VALUE when the
GC in use is <br>
ShenandoahGC or ZGC.<br>
Now, I'm guessing that Shenandoah and ZGC not being
generational, this <br>
particular configuration item is probably mostly
ignored/useless, in <br>
which case, I feel it isn't fully unexpected that if
present <br>
nonetheless, such events would be populated with default
values which, <br>
from a cursory glance at gcConfiguration.hpp[2] looks like
maxSize is <br>
set to the maximum value of uintx (which when cast as a
java long would <br>
be Long.MIN_VALUE if I'm not mistaking):<br>
<br>
class GCYoungGenerationConfiguration {<br>
public:<br>
bool has_max_size_default_value() const;<br>
uintx max_size() const;<br>
uintx min_size() const;<br>
intx new_ratio() const;<br>
};<br>
<br>
I'm not 100% sure that my understanding of the whole thing
is correct <br>
here, so please do not hesitate to correct me if it isn't.<br>
<br>
Furthermore, I'm unsure whether or not the fact that
maxSize is <br>
effectively set to Long.MIN_VALUE is necessarily an issue
here (as long <br>
as the code that handles the formatting is fixed, of
course): maybe the <br>
value carries a specific meaning I'm unaware of.<br>
<br>
I would really appreciate it if someone here is a position
to shed some <br>
light on the matter for me.<br>
<br>
Thanks!<br>
Frederic<br>
<br>
[1] <a href="https://bugs.openjdk.org/browse/JDK-8309550"
moz-do-not-send="true" class="moz-txt-link-freetext">https://bugs.openjdk.org/browse/JDK-8309550</a><br>
[2] <br>
<a
href="https://github.com/openjdk/jdk/blob/4a75fd462c002a209201d8bfc8d6c9eb286a7444/src/hotspot/share/gc/shared/gcConfiguration.hpp#L71"
moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/openjdk/jdk/blob/4a75fd462c002a209201d8bfc8d6c9eb286a7444/src/hotspot/share/gc/shared/gcConfiguration.hpp#L71</a><br>
<br>
-- <br>
Frederic Thevenet<br>
Senior Software Engineer - OpenJDK<br>
Red Hat France <<a href="https://www.redhat.com"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.redhat.com</a>><br>
BAF5 C2D2 0BE0 1715 5EE1 0815 2065 AD47 B326 EB92<br>
<br>
</div>
</span></font></div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Frederic Thevenet
Senior Software Engineer - OpenJDK
Red Hat France <a class="moz-txt-link-rfc2396E" href="https://www.redhat.com"><https://www.redhat.com></a>
BAF5 C2D2 0BE0 1715 5EE1 0815 2065 AD47 B326 EB92</pre>
</body>
</html>