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

Move the vtable length field to Klass

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • None
    • b107

      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

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

              Created:
              Updated:
              Resolved: