RFR: add parallel heap inspection support for jmap histo(G1)(Internet mail)

linzang(臧琳) linzang at tencent.com
Tue Feb 18 06:29:38 UTC 2020

Dear David, 
      Thanks a lot!
      I have updated the refined code to http://cr.openjdk.java.net/~lzang/jmap-8214535/8215264/webrev_01/.
      IMHO the parallel heap inspection can be extended to all kinds of heap as long as the heap layout can support parallel iteration.
      Maybe we can firstly use this webrev to discuss how to implement it, because I am not sure my current implementation is an appropriate way to communicate with collectedHeap, then we can extend the solution to other kinds of heap. 
>Hi Lin,
>Adding in hotspot-gc-dev as they need to see how this interacts with GC
>worker threads, and whether it needs to be extended beyond G1.
>I happened to spot one nit when browsing:
>+   virtual bool run_par_heap_inspect_task(KlassInfoTable* cit,
>+                                          BoolObjectClosure* filter,
>+                                          size_t* missed_count,
>+                                          size_t thread_num) {
>+     return NULL;
>On 18/02/2020 2:15 pm, linzang(臧琳) wrote:
>> Dear All,
>>       May I ask your help to review the follow changes:
>>       webrev:
>> http://cr.openjdk.java.net/~lzang/jmap-8214535/8215264/webrev_00/
>>      bug: https://bugs.openjdk.java.net/browse/JDK-8215624
>>      related CSR: https://bugs.openjdk.java.net/browse/JDK-8239290
>>       This patch enable parallel heap inspection of G1 for jmap histo.
>>       my simple test shown it can speed up 2x of jmap -histo with
>> parallelThreadNum set to 2 for heap at ~500M on 4-core platform.
>> ------------------------------------------------------------------------
>> BRs,
>> Lin

More information about the hotspot-gc-dev mailing list