Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v5]

2023-10-10 Thread Leonid Mesnik
On Sat, 7 Oct 2023 00:49:09 GMT, Alex Menkov wrote: >> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread >> stack references >> The change: >> - reorganize thread-related code/prepare it to use for unmounted vthreads: >> - new ThreadDumper class caches stack frames, thr

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v5]

2023-10-09 Thread Serguei Spitsyn
On Sat, 7 Oct 2023 00:49:09 GMT, Alex Menkov wrote: >> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread >> stack references >> The change: >> - reorganize thread-related code/prepare it to use for unmounted vthreads: >> - new ThreadDumper class caches stack frames, thr

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-10-06 Thread Alex Menkov
On Fri, 6 Oct 2023 19:15:06 GMT, Leonid Mesnik wrote: > The fix looks good. (I looked at the test changes mostly.) The only question, > if it makes sense to update the test to verify that heapdump works correctly > without continuations. good point. Added testing with -VMContinuations Also rea

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v5]

2023-10-06 Thread Alex Menkov
> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread > stack references > The change: > - reorganize thread-related code/prepare it to use for unmounted vthreads: > - new ThreadDumper class caches stack frames, thread serial num, frame > serial number (trace serial number

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-10-06 Thread Alex Menkov
On Fri, 6 Oct 2023 19:13:26 GMT, Serguei Spitsyn wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> misspell getRefererId for consistency > > src/hotspot/share/services/heapDumper.cpp line 1494: > >> 1492: class Threa

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-10-06 Thread Alex Menkov
On Wed, 4 Oct 2023 01:23:01 GMT, Serguei Spitsyn wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> misspell getRefererId for consistency > > src/hotspot/share/services/heapDumper.cpp line 1579: > >> 1577: >> 1578:

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v4]

2023-10-06 Thread Alex Menkov
> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread > stack references > The change: > - reorganize thread-related code/prepare it to use for unmounted vthreads: > - new ThreadDumper class caches stack frames, thread serial num, frame > serial number (trace serial number

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-10-06 Thread Serguei Spitsyn
On Fri, 29 Sep 2023 02:20:10 GMT, Alex Menkov wrote: >> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread >> stack references >> The change: >> - reorganize thread-related code/prepare it to use for unmounted vthreads: >> - new ThreadDumper class caches stack frames, th

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-10-06 Thread Leonid Mesnik
On Fri, 29 Sep 2023 02:20:10 GMT, Alex Menkov wrote: >> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread >> stack references >> The change: >> - reorganize thread-related code/prepare it to use for unmounted vthreads: >> - new ThreadDumper class caches stack frames, th

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-10-05 Thread Serguei Spitsyn
On Wed, 4 Oct 2023 01:21:02 GMT, Alex Menkov wrote: > used the same logic to split stack traces as > ThreadStackTrace::dump_stack_at_safepoint > (it was added with VT integration, it's used, for example by VM_ThreadDump). > My understanding that enterSpecial is considered as a special frame w

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-10-03 Thread Serguei Spitsyn
On Wed, 4 Oct 2023 01:23:01 GMT, Serguei Spitsyn wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> misspell getRefererId for consistency > > src/hotspot/share/services/heapDumper.cpp line 1579: > >> 1577: >> 1578:

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-10-03 Thread Serguei Spitsyn
On Fri, 29 Sep 2023 02:20:10 GMT, Alex Menkov wrote: >> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread >> stack references >> The change: >> - reorganize thread-related code/prepare it to use for unmounted vthreads: >> - new ThreadDumper class caches stack frames, th

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-10-03 Thread Alex Menkov
On Tue, 3 Oct 2023 23:15:52 GMT, Serguei Spitsyn wrote: > I wonder why the `enterSpecial` frame is not present in mounted virtual > thread stack trace case with the fix: `[6] > jdk.internal.vm.Continuation.enterSpecial(Ljdk/internal/vm/Continuation;ZZ)V > (Continuation.java:(native method))`

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-10-03 Thread Serguei Spitsyn
On Fri, 29 Sep 2023 02:20:10 GMT, Alex Menkov wrote: >> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread >> stack references >> The change: >> - reorganize thread-related code/prepare it to use for unmounted vthreads: >> - new ThreadDumper class caches stack frames, th

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-10-03 Thread Serguei Spitsyn
On Fri, 29 Sep 2023 02:20:10 GMT, Alex Menkov wrote: >> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread >> stack references >> The change: >> - reorganize thread-related code/prepare it to use for unmounted vthreads: >> - new ThreadDumper class caches stack frames, th

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v3]

2023-09-28 Thread Alex Menkov
> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread > stack references > The change: > - reorganize thread-related code/prepare it to use for unmounted vthreads: > - new ThreadDumper class caches stack frames, thread serial num, frame > serial number (trace serial number

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v2]

2023-09-28 Thread Alex Menkov
On Thu, 28 Sep 2023 02:11:45 GMT, David Holmes wrote: >> This is existing field in the class. >> There are a number (45) of misspelled "referer" in the lib, including some >> public methods (like getReferer() in line 140). >> If you think it makes sense to fix the, I can file a separate CR for t

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads

2023-09-27 Thread Alex Menkov
On Wed, 27 Sep 2023 07:25:50 GMT, Alan Bateman wrote: > > Is there anything to tell you which carrier thread is associated with which > > mounted VThread? > > The carrier and virtual threads are distinct and the HPROF format doesn't > have record types to support associations like this. Howeve

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v2]

2023-09-27 Thread David Holmes
On Wed, 27 Sep 2023 21:51:38 GMT, Alex Menkov wrote: >> test/lib/jdk/test/lib/hprof/model/Root.java line 145: >> >>> 143: >>> 144: public long getReferrerId() { >>> 145: return refererId; >> >> Spelling: `referrerId` > > This is existing field in the class. > There are a number (45

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads

2023-09-27 Thread Alex Menkov
On Wed, 27 Sep 2023 07:25:50 GMT, Alan Bateman wrote: > Is there anything to tell you which carrier thread is associated with which > mounted VThread? No (at least for now). I'm not sure if we need this information in heap dump (and if we need a way to differentiate platform(carrier)/virtual th

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v2]

2023-09-27 Thread Alex Menkov
On Wed, 27 Sep 2023 07:11:26 GMT, David Holmes wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> David's feedback > > test/hotspot/jtreg/serviceability/jvmti/vthread/HeapDump/VtreadInHeapDump.java > line 1: > >> 1:

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads [v2]

2023-09-27 Thread Alex Menkov
> This is subtask of JDK-8299426: Heap dump does not contain virtual Thread > stack references > The change: > - reorganize thread-related code/prepare it to use for unmounted vthreads: > - new ThreadDumper class caches stack frames, thread serial num, frame > serial number (trace serial number

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads

2023-09-27 Thread Alan Bateman
On Wed, 27 Sep 2023 07:18:27 GMT, David Holmes wrote: > Is there anything to tell you which carrier thread is associated with which > mounted VThread? The carrier and virtual threads are distinct and the HPROF format doesn't have record types to support associations like this. However, your qu

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads

2023-09-27 Thread David Holmes
On Thu, 21 Sep 2023 20:06:13 GMT, Alex Menkov wrote: > This is subtask of JDK-8299426: Heap dump does not contain virtual Thread > stack references > The change: > - reorganize thread-related code/prepare it to use for unmounted vthreads: > - new ThreadDumper class caches stack frames, thread

Re: RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads

2023-09-27 Thread David Holmes
On Thu, 21 Sep 2023 20:06:13 GMT, Alex Menkov wrote: > This is subtask of JDK-8299426: Heap dump does not contain virtual Thread > stack references > The change: > - reorganize thread-related code/prepare it to use for unmounted vthreads: > - new ThreadDumper class caches stack frames, thread

RFR: JDK-8316691: Heap dump: separate stack traces for mounted virtual threads

2023-09-21 Thread Alex Menkov
This is subtask of JDK-8299426: Heap dump does not contain virtual Thread stack references The change: - reorganize thread-related code/prepare it to use for unmounted vthreads; - separate track traces for mounted virtual threads: - separate HPROF_FRAME/HPROF_TRACE records for mounted vthreads a