<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Leslie,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you for your response. I am not sure I understand it, though. GCViewer is not a small tool, which extracts all kinds of information from the GC log. However, our goal for now is very limited: we just need to recognize and parse log lines that indicate
STW GC pauses, that's it. We cannot reuse GCViewer code. On the other hand, I was hoping that I could get a more definitive/accurate answer directly from ZGC developers, rather than by reading code of a 3<sup>rd</sup> party tool. </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
May I ask you to answer at least my second question: what's the meaning of lines like the one below?</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; font-weight: 400; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);">[2023-09-05T18:47:44.003+0000][505898.295s][debug
][gc,phases ] GC(76661) Pause Mark Try Complete (ZWorker#2) 0.002ms</span></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; font-weight: 400; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);"><br>
</span></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; font-weight: 400; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);">Thank
you,</span></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; font-weight: 400; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);"><br>
</span></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Misha<span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; font-weight: 400; color: rgb(36, 36, 36); background-color: rgb(255, 255, 255);"><br>
</span></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> Leslie Zhai <zhaixiang@loongson.cn><br>
<b>Sent:</b> Wednesday, September 6, 2023 5:35 PM<br>
<b>To:</b> Misha Dmitriev <mdmitriev@linkedin.com><br>
<b>Cc:</b> zgc-dev@openjdk.org <zgc-dev@openjdk.org><br>
<b>Subject:</b> Re: What gc.log lines reliably indicate STW pauses for ZGC?</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Misha,<br>
<br>
Could you try GCViewer? <a href="https://github.com/chewiebug/GCViewer">https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fchewiebug%2FGCViewer&data=05%7C01%7Cmdmitriev%40linkedin.com%7Ce07cc8ab5300462417f408dbaf3a598d%7C72f988bf86f141af91ab2d7cd011db47%7C0%7C0%7C638296437390082029%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=YjtYLdtX%2FyjxNld0k7LcHZVe1YlS2IoDOedJv3JzHsQ%3D&reserved=0</a><br>
<br>
enhance support for zgc and shenandoah <a href="https://github.com/chewiebug/GCViewer/pull/261">
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fchewiebug%2FGCViewer%2Fpull%2F261&data=05%7C01%7Cmdmitriev%40linkedin.com%7Ce07cc8ab5300462417f408dbaf3a598d%7C72f988bf86f141af91ab2d7cd011db47%7C0%7C0%7C638296437390082029%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=YvfbyGgBl9s5fZ4aNqCkget1AXKGIJr0mYnhSC%2FAAXc%3D&reserved=0</a><br>
<br>
<br>
> 2023$BG/(B9$B7n(B7$BF|(B 03:15$B!$(BMisha Dmitriev <mdmitriev@linkedin.com> $B<LF;!'(B<br>
> <br>
> Hi ZGC developers,<br>
> <br>
> I work at LinkedIn, where we have internal tooling for end-to-end GC performance monitoring and analysis. To record GC pauses and other interesting events, we parse GC logs as they are generated, in near real time. Since JDK 11, the unified logging format
allowed us to extract STW pauses for all GCs in the same straightforward way: we look for lines such as:<br>
> <br>
> [2020-03-09T19:12:22.542+0000][info][gc ] GC(62189) Pause Young (Allocation Failure) 14263M->9334M(14745M) 41.359ms<br>
> <br>
> that is, we check every line for the following condition (we don't use pattern matching for speed):<br>
> <br>
> if (line.endsWith("ms") && line.contains("[gc ") && line.contains("Pause ")) {<br>
> // Extract pause time in ms from the end of the line<br>
> <br>
> However, looks like ZGC, though it uses the unified logging format, has a different format for STW pause lines. From the logs that we have, I am not 100% sure I understand everything. So far looks like the candidates lines look like<br>
<br>
Please look at the enhance support for ZGC about GCViewer.<br>
<br>
Thanks,<br>
Leslie Zhai<br>
<br>
> <br>
> [2023-09-05T18:47:27.323+0000][505881.615s][info ][gc,phases ] GC(76657) Pause Mark Start 0.024ms<br>
> <br>
> i.e. the condition should be<br>
> <br>
> if (line.endsWith("ms") && line.contains("[gc,phases ") && line.contains("Pause ")) {<br>
> // Extract pause time in ms from the end of line<br>
> <br>
> I wonder if this is all we need or I am missing something?<br>
> <br>
> Also, what's the meaning of lines like these:<br>
> <br>
> [2023-09-05T18:47:44.003+0000][505898.295s][debug ][gc,phases ] GC(76661) Pause Mark Try Complete (ZWorker#2) 0.002ms<br>
> <br>
> Formally they look similar to the previous line, but "debug" and "ZWorker#2" suggests that it may not be a STW pause but pausing just one thread? Please advise.<br>
> <br>
> Thank you,<br>
> <br>
> Misha<br>
<br>
<br>
</div>
</span></font></div>
</body>
</html>