Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-07 Thread Johan Sjölen
On Wed, 1 Nov 2023 10:04:30 GMT, Johan Sjölen wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix various builds > > OK, went through the cache. Will continue later. > @jdksjolen anything more needed from my

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-04 Thread Thomas Stuefe
On Wed, 1 Nov 2023 10:04:30 GMT, Johan Sjölen wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix various builds > > OK, went through the cache. Will continue later. @jdksjolen anything more needed from my side?

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-02 Thread Thomas Stuefe
On Thu, 2 Nov 2023 15:25:14 GMT, Brice Dutheil wrote: >> This prints protection and offset. The former is interesting for obvious >> reasons (e.g. lets you tell apart stack guard regions from stack, or >> uncommitted from committed regions) and the latter interesting for some >> corner cases

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-02 Thread Brice Dutheil
On Wed, 1 Nov 2023 06:26:57 GMT, Thomas Stuefe wrote: >> src/hotspot/os/linux/memMapPrinter_linux.cpp line 59: >> >>> 57: void print_OS_specific_details(outputStream* st) const override { >>> 58: st->print("%s %s ", _info.prot, _info.offset); >>> 59: } >> >> If that's all this is

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-02 Thread Thomas Stuefe
On Wed, 1 Nov 2023 10:04:04 GMT, Johan Sjölen wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix various builds > > src/hotspot/share/nmt/memMapPrinter.cpp line 119: > >> 117: assert(_capacity > _count,

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-02 Thread Thomas Stuefe
On Wed, 1 Nov 2023 10:46:21 GMT, Johan Sjölen wrote: >> Yes, it resulted in a significant performance gain for a test run where I >> interleaved non-committed and committed memory of the same tag. I may have >> been mistaken, of course. > > It being committed or reserved shouldn't matter (I

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Johan Sjölen
On Wed, 1 Nov 2023 10:13:03 GMT, Thomas Stuefe wrote: >> src/hotspot/share/nmt/memMapPrinter.cpp line 105: >> >>> 103: _ranges[_count - 1].to = to; >>> 104: return true; >>> 105: } >> >> I'm pretty sure that the virtual memory tracker already gives you the >> minimal set of

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Thomas Stuefe
On Wed, 1 Nov 2023 10:01:43 GMT, Johan Sjölen wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix various builds > > src/hotspot/share/nmt/memMapPrinter.cpp line 105: > >> 103: _ranges[_count - 1].to = to;

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Johan Sjölen
On Wed, 1 Nov 2023 09:52:24 GMT, Thomas Stuefe wrote: >> src/hotspot/share/nmt/memMapPrinter.cpp line 99: >> >>> 97: } >>> 98: >>> 99: bool add(const void* from, const void* to, MEMFLAGS f) { >> >> Please mention that we're `add`ing in sorted order, that is that `forall R >> \in _ranges:

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Johan Sjölen
On Sat, 28 Oct 2023 13:04:05 GMT, Thomas Stuefe wrote: >> Analysts and supporters often use /proc/xx/maps to make sense of the memory >> footprint of a process. >> >> Interpreting the memory map correctly can help when used as a complement to >> other tools (e.g. NMT). There even exist tools

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Thomas Stuefe
On Wed, 1 Nov 2023 09:48:39 GMT, Johan Sjölen wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix various builds > > src/hotspot/share/nmt/memMapPrinter.cpp line 99: > >> 97: } >> 98: >> 99: bool add(const

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Johan Sjölen
On Sat, 28 Oct 2023 13:04:05 GMT, Thomas Stuefe wrote: >> Analysts and supporters often use /proc/xx/maps to make sense of the memory >> footprint of a process. >> >> Interpreting the memory map correctly can help when used as a complement to >> other tools (e.g. NMT). There even exist tools

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Johan Sjölen
On Wed, 1 Nov 2023 07:32:23 GMT, Thomas Stuefe wrote: >> src/hotspot/share/nmt/memMapPrinter.cpp line 79: >> >>> 77: const void* const min = MAX2(from1, from2); >>> 78: const void* const max = MIN2(to1, to2); >>> 79: return min < max; >> >> I had to rewrite it as: >> >> `return

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Johan Sjölen
On Wed, 1 Nov 2023 09:37:22 GMT, Johan Sjölen wrote: >> I'll do the former, that is clearer I agree, but leave the latter out (I >> assume with the macro you mean add it to globalDefenitions.hpp). >> >> I fear that a lot of bikeshedding and general discussions would start, and >> to do it

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Thomas Stuefe
On Tue, 31 Oct 2023 17:08:15 GMT, Gerard Ziemski wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix various builds > > src/hotspot/share/nmt/memMapPrinter.cpp line 79: > >> 77: const void* const min =

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Thomas Stuefe
On Tue, 31 Oct 2023 16:58:19 GMT, Gerard Ziemski wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix various builds > > src/hotspot/os/linux/memMapPrinter_linux.cpp line 59: > >> 57: void

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Thomas Stuefe
On Mon, 30 Oct 2023 17:31:30 GMT, Gerard Ziemski wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix various builds > > src/hotspot/os/linux/memMapPrinter_linux.cpp line 83: > >> 81: char line[linesize]; >>

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-11-01 Thread Thomas Stuefe
On Mon, 30 Oct 2023 10:29:56 GMT, Johan Sjölen wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix various builds > > src/hotspot/os/linux/memMapPrinter_linux.cpp line 80: > >> 78: FILE* f =

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-10-31 Thread Gerard Ziemski
On Sat, 28 Oct 2023 13:04:05 GMT, Thomas Stuefe wrote: >> Analysts and supporters often use /proc/xx/maps to make sense of the memory >> footprint of a process. >> >> Interpreting the memory map correctly can help when used as a complement to >> other tools (e.g. NMT). There even exist tools

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-10-30 Thread Johan Sjölen
On Sat, 28 Oct 2023 13:04:05 GMT, Thomas Stuefe wrote: >> Analysts and supporters often use /proc/xx/maps to make sense of the memory >> footprint of a process. >> >> Interpreting the memory map correctly can help when used as a complement to >> other tools (e.g. NMT). There even exist tools

Re: RFR: JDK-8318636: Add jcmd to print annotated process memory map [v6]

2023-10-28 Thread Thomas Stuefe
> Analysts and supporters often use /proc/xx/maps to make sense of the memory > footprint of a process. > > Interpreting the memory map correctly can help when used as a complement to > other tools (e.g. NMT). There even exist tools out there that attempt to > annotate the process memory map