Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8005604

HPROF should report the actual instance size

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: tbd_minor
    • Component/s: tools
    • Labels:
      None

      Description

      At this point, hprof dumper iterates the fields trying the deduce the instance size. However, this is prone to errors in estimations, because:
       a) object header sizes can be changed without notice;
       b) object fields can be aligned/padded for correctness/performance reasons

      We have already identified that with upcoming @Contended, hprof estimates can be terribly wrong, see:
      http://cs.oswego.edu/pipermail/concurrency-interest/2012-November/010276.html

      Luckily, VM already knows the exact instance size, and we can just reuse this info.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              shade Aleksey Shipilev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: