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

Move the vtable length field to Klass

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b107

      Description

      Currently, both InstanceKlass and ArrayKlass have separate methods for storing the length of the vtable as an integer field. The vtable length is then accessed by a pure virtual accessor method on Klass.

      Suggested fix is to move the _vtable_len field to Klass, taking into account the effect this might have on the size of InstanceKlass.
      The related accessors for the vtable length and vtable start offsets should also be moved to Klass in order to maintain consistency.
      The vtable start offset calculation is dependent on the size of InstanceKlass (or rather the maximum size of any subclass of Klass) since the vtable must start at the same offset for all Klass subclasses. The dependency on the InstanceKlass size forces the implementation of vtable_start_offset into klass.cpp, which already has a dependency on instanceKlass.hpp

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mgerdin Mikael Gerdin (Inactive)
              Reporter:
              mgerdin Mikael Gerdin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: