Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new DumpAllOffHeapEntriesCommand in DDR #21047

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LinHu2016
Copy link
Contributor

@LinHu2016 LinHu2016 commented Jan 31, 2025

  • new DumpAllOffHeapEntriesCommand provides a way to list all
    off-heap entries in the core file, which contain off-heap data
    (only when off-heap has been enabled in jvm and gcpolicy has been set
    to Balanced GC mode).
  • for the rest of cases(off-heap has been disabled or "old core file",
    which did not contain off-heap option at all), print out error message
    "This command only works with the core file,
    which contains off-heap."
  • off-heap entry information includes
    the address of the Array Object,
    the data address and
    the size of array data

Signed-off-by: lhu [email protected]

@LinHu2016 LinHu2016 force-pushed the DDR_update4offheap branch 2 times, most recently from 73c3599 to 37ff513 Compare February 3, 2025 16:20
@LinHu2016
Copy link
Contributor Author

LinHu2016 commented Feb 3, 2025

output format for DumpAllSparseHeapEntriesCommand

> !dumpalloffheapentries
List off-heap entries(521 entries)
+------------------+------------------+------------------
|  array object    |  data address    |      size        
+------------------+------------------+------------------
 0x00007f0889e2ff60 0x00007f025eef2000 0x0000000000014000
 0x00007f08b7aa1090 0x00007f025edc1000 0x0000000000020000
 0x00007f08b7aa1250 0x00007f025ede1000 0x0000000000020000
 0x00007f08b7aa1410 0x00007f025ee01000 0x0000000000020000
 0x00007f08b7aa15d0 0x00007f025ee21000 0x0000000000020000
 0x00007f08b7aa1790 0x00007f025ee41000 0x0000000000020000
 0x00007f08b7aa1950 0x00007f025ee61000 0x0000000000020000
 0x00007f088e09fc40 0x00007f025ee81000 0x0000000000021000
 0x00007f088cfa0190 0x00007f025eea2000 0x0000000000017000
 0x00007f088d34f5a8 0x00007f025eeb9000 0x0000000000021000
 0x00007f088c3febf0 0x00007f025eeda000 0x0000000000018000
...
 0x00007f08715cb6e8 0x00007f025798b000 0x0000000000010000
 0x00007f0869f8a8f8 0x00007f0257c6b000 0x0000000000010000
+------------------+------------------+------------------

@dmitripivkine
Copy link
Contributor

just curious, how this output looks like for Compressed Refs? I guess there are leading zeroes added to the object address.
BTW this PR still have a few whitespace issues (see console output for Line Endings Check job)

@LinHu2016 LinHu2016 force-pushed the DDR_update4offheap branch 2 times, most recently from 4658ac3 to c21c507 Compare February 3, 2025 18:56
@LinHu2016
Copy link
Contributor Author

just curious, how this output looks like for Compressed Refs? I guess there are leading zeroes added to the object address. BTW this PR still have a few whitespace issues (see console output for Line Endings Check job)

I think it always output 64 bit address for object pointer, and I will update for whitespace issues, thanks

@amicic amicic added the comp:gc label Feb 5, 2025
@amicic
Copy link
Contributor

amicic commented Feb 5, 2025

@keithc-ca please review

@LinHu2016 LinHu2016 force-pushed the DDR_update4offheap branch 4 times, most recently from 9aa77cb to 9e709bf Compare February 7, 2025 17:34
@keithc-ca keithc-ca changed the title Add new DumpAllSparseHeapEntriesCommand in DDR Add new DumpAllOffHeapEntriesCommand in DDR Feb 11, 2025
@LinHu2016 LinHu2016 force-pushed the DDR_update4offheap branch 3 times, most recently from 9caf04b to 27bd42b Compare February 13, 2025 17:16
@LinHu2016 LinHu2016 force-pushed the DDR_update4offheap branch 2 times, most recently from 8a5797b to d6a5965 Compare February 20, 2025 15:45
@keithc-ca
Copy link
Contributor

When used to access a system dump from a VM where there are no off-heap entries (perhaps because the balanced GC mode was not used), the command should produce some output to make clear that the command worked, by explaining why there are no off-heap entries.

@LinHu2016 LinHu2016 force-pushed the DDR_update4offheap branch 2 times, most recently from 555dc4b to 48dbadb Compare February 24, 2025 18:28
@keithc-ca
Copy link
Contributor

When I tested this locally, I got no output at all; in particular, the message you modified recently was not printed so that doesn't help.

 - new DumpAllOffHeapEntriesCommand provides a way to list all
  off-heap entries in the core file, which contain off heap data
  (only when off-heap has been enabled in jvm and gcpolicy has been set
  to Balanced GC mode).
 - for the rest of cases(off-heap has been disabled or "old core file",
  which did not contain off-heap option at all), print out error message
  "This command only works with the core file,
  which contains off-heap."
 - off-heap entry information includes
   the address of the Array Object,
   the data address and
   the size of array data

Signed-off-by: lhu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants