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

Consolidate has_been_archived() and has_been_buffered() in ArchiveBuilder

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • None
    • hotspot

      These two functions look similar but work slightly differently. The difference has caused JDK-8365805. They should be combined into a single function.

      https://github.com/openjdk/jdk/blob/024292ac4dde7e49816d82d5f8a30a3e11f44d18/src/hotspot/share/cds/archiveBuilder.cpp#L749-L762

      bool ArchiveBuilder::has_been_archived(address src_addr) const {
        SourceObjInfo* p = _src_obj_table.get(src_addr);
        return (p != nullptr);
      }

      bool ArchiveBuilder::has_been_buffered(address src_addr) const {
        if (RegeneratedClasses::has_been_regenerated(src_addr) ||
            _src_obj_table.get(src_addr) == nullptr ||
            get_buffered_addr(src_addr) == nullptr) {
          return false;
        } else {
          return true;
        }
      }

            Unassigned Unassigned
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: