8015428: Remove unused CDS support from StringTable

Mon, 27 May 2013 12:56:34 +0200

author
stefank
date
Mon, 27 May 2013 12:56:34 +0200
changeset 5195
95c00927be11
parent 5194
eda078b01c65
child 5196
8dbc025ff709

8015428: Remove unused CDS support from StringTable
Summary: The string in StringTable is not used by CDS anymore. Remove the unnecessary code in preparation for 8015422: Large performance hit when the StringTable is walked twice in Parallel Scavenge
Reviewed-by: pliden, tschatzl, coleenp

src/share/vm/classfile/symbolTable.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/classfile/symbolTable.cpp	Mon May 27 15:22:59 2013 +0200
     1.2 +++ b/src/share/vm/classfile/symbolTable.cpp	Mon May 27 12:56:34 2013 +0200
     1.3 @@ -745,41 +745,28 @@
     1.4      HashtableEntry<oop, mtSymbol>** p = the_table()->bucket_addr(i);
     1.5      HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
     1.6      while (entry != NULL) {
     1.7 -      // Shared entries are normally at the end of the bucket and if we run into
     1.8 -      // a shared entry, then there is nothing more to remove. However, if we
     1.9 -      // have rehashed the table, then the shared entries are no longer at the
    1.10 -      // end of the bucket.
    1.11 -      if (entry->is_shared() && !use_alternate_hashcode()) {
    1.12 -        break;
    1.13 -      }
    1.14 -      assert(entry->literal() != NULL, "just checking");
    1.15 -      if (entry->is_shared() || is_alive->do_object_b(entry->literal())) {
    1.16 +      assert(!entry->is_shared(), "CDS not used for the StringTable");
    1.17 +
    1.18 +      if (is_alive->do_object_b(entry->literal())) {
    1.19          p = entry->next_addr();
    1.20        } else {
    1.21          *p = entry->next();
    1.22          the_table()->free_entry(entry);
    1.23        }
    1.24 -      entry = (HashtableEntry<oop, mtSymbol>*)HashtableEntry<oop, mtSymbol>::make_ptr(*p);
    1.25 +      entry = *p;
    1.26      }
    1.27    }
    1.28  }
    1.29  
    1.30  void StringTable::oops_do(OopClosure* f) {
    1.31    for (int i = 0; i < the_table()->table_size(); ++i) {
    1.32 -    HashtableEntry<oop, mtSymbol>** p = the_table()->bucket_addr(i);
    1.33      HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
    1.34      while (entry != NULL) {
    1.35 +      assert(!entry->is_shared(), "CDS not used for the StringTable");
    1.36 +
    1.37        f->do_oop((oop*)entry->literal_addr());
    1.38  
    1.39 -      // Did the closure remove the literal from the table?
    1.40 -      if (entry->literal() == NULL) {
    1.41 -        assert(!entry->is_shared(), "immutable hashtable entry?");
    1.42 -        *p = entry->next();
    1.43 -        the_table()->free_entry(entry);
    1.44 -      } else {
    1.45 -        p = entry->next_addr();
    1.46 -      }
    1.47 -      entry = (HashtableEntry<oop, mtSymbol>*)HashtableEntry<oop, mtSymbol>::make_ptr(*p);
    1.48 +      entry = entry->next();
    1.49      }
    1.50    }
    1.51  }

mercurial