1.1 --- a/src/share/vm/memory/sharedHeap.cpp Fri Jun 14 08:02:32 2013 +0200 1.2 +++ b/src/share/vm/memory/sharedHeap.cpp Tue Jun 18 12:31:07 2013 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -47,7 +47,6 @@ 1.11 SH_PS_SystemDictionary_oops_do, 1.12 SH_PS_ClassLoaderDataGraph_oops_do, 1.13 SH_PS_jvmti_oops_do, 1.14 - SH_PS_StringTable_oops_do, 1.15 SH_PS_CodeCache_oops_do, 1.16 // Leave this one last. 1.17 SH_PS_NumElements 1.18 @@ -127,6 +126,8 @@ 1.19 { 1.20 if (_active) { 1.21 outer->change_strong_roots_parity(); 1.22 + // Zero the claimed high water mark in the StringTable 1.23 + StringTable::clear_parallel_claimed_index(); 1.24 } 1.25 } 1.26 1.27 @@ -154,14 +155,16 @@ 1.28 // Global (strong) JNI handles 1.29 if (!_process_strong_tasks->is_task_claimed(SH_PS_JNIHandles_oops_do)) 1.30 JNIHandles::oops_do(roots); 1.31 + 1.32 // All threads execute this; the individual threads are task groups. 1.33 CLDToOopClosure roots_from_clds(roots); 1.34 CLDToOopClosure* roots_from_clds_p = (is_scavenging ? NULL : &roots_from_clds); 1.35 - if (ParallelGCThreads > 0) { 1.36 - Threads::possibly_parallel_oops_do(roots, roots_from_clds_p ,code_roots); 1.37 + if (CollectedHeap::use_parallel_gc_threads()) { 1.38 + Threads::possibly_parallel_oops_do(roots, roots_from_clds_p, code_roots); 1.39 } else { 1.40 Threads::oops_do(roots, roots_from_clds_p, code_roots); 1.41 } 1.42 + 1.43 if (!_process_strong_tasks-> is_task_claimed(SH_PS_ObjectSynchronizer_oops_do)) 1.44 ObjectSynchronizer::oops_do(roots); 1.45 if (!_process_strong_tasks->is_task_claimed(SH_PS_FlatProfiler_oops_do)) 1.46 @@ -189,8 +192,12 @@ 1.47 } 1.48 } 1.49 1.50 - if (!_process_strong_tasks->is_task_claimed(SH_PS_StringTable_oops_do)) { 1.51 - if (so & SO_Strings) { 1.52 + // All threads execute the following. A specific chunk of buckets 1.53 + // from the StringTable are the individual tasks. 1.54 + if (so & SO_Strings) { 1.55 + if (CollectedHeap::use_parallel_gc_threads()) { 1.56 + StringTable::possibly_parallel_oops_do(roots); 1.57 + } else { 1.58 StringTable::oops_do(roots); 1.59 } 1.60 }