Mercurial > hg > graal-jvmci-8
diff src/share/vm/classfile/symbolTable.hpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | 893ce66f7473 |
children | 52b4284cb496 |
line wrap: on
line diff
--- a/src/share/vm/classfile/symbolTable.hpp Tue Apr 01 14:09:03 2014 +0200 +++ b/src/share/vm/classfile/symbolTable.hpp Tue Apr 01 13:57:07 2014 +0200 @@ -86,8 +86,8 @@ static bool _needs_rehashing; // For statistics - static int _symbols_removed; - static int _symbols_counted; + static int symbols_removed; + static int symbols_counted; Symbol* allocate_symbol(const u1* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F @@ -121,11 +121,6 @@ static Arena* arena() { return _arena; } // called for statistics static void initialize_symbols(int arena_alloc_size = 0); - - static volatile int _parallel_claimed_idx; - - // Release any dead symbols - static void buckets_unlink(int start_idx, int end_idx, int* processed, int* removed, size_t* memory_total); public: enum { symbol_alloc_batch_size = 8, @@ -182,14 +177,7 @@ unsigned int* hashValues, TRAPS); // Release any dead symbols - static void unlink() { - int processed = 0; - int removed = 0; - unlink(&processed, &removed); - } - static void unlink(int* processed, int* removed); - // Release any dead symbols, possibly parallel version - static void possibly_parallel_unlink(int* processed, int* removed); + static void unlink(); // iterate over symbols static void symbols_do(SymbolClosure *cl); @@ -247,9 +235,6 @@ // Rehash the symbol table if it gets out of balance static void rehash_table(); static bool needs_rehashing() { return _needs_rehashing; } - // Parallel chunked scanning - static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; } - static int parallel_claimed_index() { return _parallel_claimed_idx; } }; class StringTable : public Hashtable<oop, mtSymbol> { @@ -273,10 +258,7 @@ // Apply the give oop closure to the entries to the buckets // in the range [start_idx, end_idx). - static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx); - // Unlink or apply the give oop closure to the entries to the buckets - // in the range [start_idx, end_idx). - static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed); + static void buckets_do(OopClosure* f, int start_idx, int end_idx); StringTable() : Hashtable<oop, mtSymbol>((int)StringTableSize, sizeof (HashtableEntry<oop, mtSymbol>)) {} @@ -298,28 +280,15 @@ // GC support // Delete pointers to otherwise-unreachable objects. - static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f) { - int processed = 0; - int removed = 0; - unlink_or_oops_do(cl, f, &processed, &removed); - } + static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f); static void unlink(BoolObjectClosure* cl) { - int processed = 0; - int removed = 0; - unlink_or_oops_do(cl, NULL, &processed, &removed); + unlink_or_oops_do(cl, NULL); } - static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f, int* processed, int* removed); - static void unlink(BoolObjectClosure* cl, int* processed, int* removed) { - unlink_or_oops_do(cl, NULL, processed, removed); - } + // Serially invoke "f->do_oop" on the locations of all oops in the table. static void oops_do(OopClosure* f); - // Possibly parallel versions of the above - static void possibly_parallel_unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f, int* processed, int* removed); - static void possibly_parallel_unlink(BoolObjectClosure* cl, int* processed, int* removed) { - possibly_parallel_unlink_or_oops_do(cl, NULL, processed, removed); - } + // Possibly parallel version of the above static void possibly_parallel_oops_do(OopClosure* f); // Hashing algorithm, used as the hash value used by the @@ -380,6 +349,5 @@ // Parallel chunked scanning static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; } - static int parallel_claimed_index() { return _parallel_claimed_idx; } }; #endif // SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP