Wed, 05 Feb 2014 14:29:34 +0100
8033443: Test8000311 fails after latest changes to parallelize string and symbol table unlink
Summary: When string and symbol table unlink are not performed in parallel, the claim index we check is not updated, and so a guarantee fails. Take this into account when checking the guarantee.
Reviewed-by: brutisso, jwilhelm
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Jan 31 09:58:06 2014 +0100 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Wed Feb 05 14:29:34 2014 +0100 1.3 @@ -5210,9 +5210,12 @@ 1.4 bool _process_symbols; 1.5 int _symbols_processed; 1.6 int _symbols_removed; 1.7 + 1.8 + bool _do_in_parallel; 1.9 public: 1.10 G1StringSymbolTableUnlinkTask(BoolObjectClosure* is_alive, bool process_strings, bool process_symbols) : 1.11 AbstractGangTask("Par String/Symbol table unlink"), _is_alive(is_alive), 1.12 + _do_in_parallel(G1CollectedHeap::use_parallel_gc_threads()), 1.13 _process_strings(process_strings), _strings_processed(0), _strings_removed(0), 1.14 _process_symbols(process_symbols), _symbols_processed(0), _symbols_removed(0) { 1.15 1.16 @@ -5227,16 +5230,16 @@ 1.17 } 1.18 1.19 ~G1StringSymbolTableUnlinkTask() { 1.20 - guarantee(!_process_strings || StringTable::parallel_claimed_index() >= _initial_string_table_size, 1.21 + guarantee(!_process_strings || !_do_in_parallel || StringTable::parallel_claimed_index() >= _initial_string_table_size, 1.22 err_msg("claim value "INT32_FORMAT" after unlink less than initial string table size "INT32_FORMAT, 1.23 StringTable::parallel_claimed_index(), _initial_string_table_size)); 1.24 - guarantee(!_process_symbols || SymbolTable::parallel_claimed_index() >= _initial_symbol_table_size, 1.25 + guarantee(!_process_symbols || !_do_in_parallel || SymbolTable::parallel_claimed_index() >= _initial_symbol_table_size, 1.26 err_msg("claim value "INT32_FORMAT" after unlink less than initial symbol table size "INT32_FORMAT, 1.27 SymbolTable::parallel_claimed_index(), _initial_symbol_table_size)); 1.28 } 1.29 1.30 void work(uint worker_id) { 1.31 - if (G1CollectedHeap::use_parallel_gc_threads()) { 1.32 + if (_do_in_parallel) { 1.33 int strings_processed = 0; 1.34 int strings_removed = 0; 1.35 int symbols_processed = 0;