[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: Extend Native Memory Tracking over the JDK ? (was: Proposal: track zlib native memory usage with
From:       "Carter Kozak" <ckozak () ckozak ! net>
Date:       2022-11-30 20:43:39
Message-ID: cb8b2707-4f43-4e91-83ac-9d3b1f6df2bb () app ! fastmail ! com
[Download RAW message or body]

This looks fantastic, thank you so much! I can confirm that the proposed 
design would solve my use-case.

I'd enjoy discussing the NMT event  contract somewhere more specific
to the implementation, but I don't want to muddle this thread with 
implementation details.

Carter Kozak

On Wed, Nov 30, 2022, at 03:37, Stefan Johansson wrote:
> Hi Carter,
> 
> Your mail made me pick up an old item from my wishlist: to have native 
> memory tracking information available in JFR recordings. When we, in GC, 
> do improvements to decrease the native memory overhead of our 
> algorithms, NMT is a very good tool to track the progress. We have 
> scripts that sound very similar to what you describe and more than once 
> I've been thinking about adding this information into JFR. But it has 
> not been a priority and the greater value has been unclear.
> 
> Hearing that others might also benefit from such a change I took a 
> discussion with the JFR team on how to best proceed with this. I have 
> created a branch for this and will probably create a PR for it shortly, 
> but I thought I would drop it here first:
> https://github.com/kstefanj/jdk/tree/8157023-jfr-events-for-nmt
> 
> The change adds two new JFR events: one for the total usage and one for 
> the usage of each memory type. These are sent only if Native Memory 
> Tracking is turned on, and they are enabled in the default JFR profile 
> with an interval of 1s. This might change during reviewing but it was a 
> good starting point.
> 
> With this you will be able to use JFR streaming to access the events 
> from within your running process. I hope this will help your use cases 
> and please let us know if you have any comments or suggestions.
> 
> Thanks,
> Stefan

[Attachment #3 (text/html)]

<!DOCTYPE html><html><head><title></title><style \
type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>This \
looks fantastic, thank you so much! I can confirm that the \
proposed&nbsp;<br></div><div>design would solve my \
use-case.<br></div><div><br></div><div>I'd enjoy discussing the NMT event&nbsp; \
contract somewhere more specific<br></div><div>to the implementation, but I don't \
want to muddle this thread with <br></div><div>implementation details.<br><br>Carter \
Kozak<br><br></div><div><div>On Wed, Nov 30, 2022, at 03:37, Stefan Johansson \
wrote:<br></div></div><blockquote type="cite" id="qt" style=""><div>Hi \
Carter,<br></div><div><br></div><div>Your mail made me pick up an old item from my \
wishlist: to have native&nbsp;<br></div><div>memory tracking information available in \
JFR recordings. When we, in GC,&nbsp;<br></div><div>do improvements to decrease the \
native memory overhead of our&nbsp;<br></div><div>algorithms, NMT is a very good tool \
to track the progress. We have&nbsp;<br></div><div>scripts that sound very similar to \
what you describe and more than once&nbsp;<br></div><div>I've been thinking about \
adding this information into JFR. But it has&nbsp;<br></div><div>not been a priority \
and the greater value has been unclear.<br></div><div><br></div><div>Hearing that \
others might also benefit from such a change I took a&nbsp;<br></div><div>discussion \
with the JFR team on how to best proceed with this. I \
have&nbsp;<br></div><div>created a branch for this and will probably create a PR for \
it shortly,&nbsp;<br></div><div>but I thought I would drop it here \
first:<br></div><div><a \
href="https://github.com/kstefanj/jdk/tree/8157023-jfr-events-for-nmt">https://github. \
com/kstefanj/jdk/tree/8157023-jfr-events-for-nmt</a><br></div><div><br></div><div>The \
change adds two new JFR events: one for the total usage and one \
for&nbsp;<br></div><div>the usage of each memory type. These are sent only if Native \
Memory&nbsp;<br></div><div>Tracking is turned on, and they are enabled in the default \
JFR profile&nbsp;<br></div><div>with an interval of 1s. This might change during \
reviewing but it was a&nbsp;<br></div><div>good starting \
point.<br></div><div><br></div><div>With this you will be able to use JFR streaming \
to access the events&nbsp;<br></div><div>from within your running process. I hope \
this will help your use cases&nbsp;<br></div><div>and please let us know if you have \
any comments or suggestions.<br></div><div><br></div><div>Thanks,<br></div><div>Stefan<br></div></blockquote><div><br></div></body></html>




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic