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

Add oopDesc::field_offset()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • None
    • hotspot
    • None
    • gc
    • b15

        The Access API has a function HeapAccess<>::oop_load_at(obj, offset). When using OopClosure you are handed interior object pointers, pointing to the oop fields. I propose that we add oopDesc::field_offset, so that the offset can be found with obj->field_offset(oop_addr)

        We currently have to usages in ZGC:
        http://hg.openjdk.java.net/zgc/zgc/file/3a52c8361e20/src/hotspot/share/gc/z/zOopClosures.cpp#l49

        http://hg.openjdk.java.net/zgc/zgc/file/3a52c8361e20/src/hotspot/share/gc/z/zHeapIterator.cpp#l87

              stefank Stefan Karlsson
              stefank Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: