8061205: MetadataOnStackMark only needs to walk code cache during class redefinition

Only do full metadata walk during class redefinition and only walk handles during class unloading.

Reviewed-by: sspitsyn, stefank
This commit is contained in:
Coleen Phillimore 2015-03-13 12:40:39 -04:00
parent 984cf4c9b5
commit 7b384c6958
19 changed files with 147 additions and 248 deletions

View file

@ -2532,11 +2532,6 @@ void ConcurrentMark::weakRefsWork(bool clear_all_soft_refs) {
G1CMTraceTime trace("Unloading", G1Log::finer());
if (ClassUnloadingWithConcurrentMark) {
// Cleaning of klasses depends on correct information from MetadataMarkOnStack. The CodeCache::mark_on_stack
// part is too slow to be done serially, so it is handled during the weakRefsWorkParallelPart phase.
// Defer the cleaning until we have complete on_stack data.
MetadataOnStackMark md_on_stack(false /* Don't visit the code cache at this point */);
bool purged_classes;
{
@ -2548,11 +2543,6 @@ void ConcurrentMark::weakRefsWork(bool clear_all_soft_refs) {
G1CMTraceTime trace("Parallel Unloading", G1Log::finest());
weakRefsWorkParallelPart(&g1_is_alive, purged_classes);
}
{
G1CMTraceTime trace("Deallocate Metadata", G1Log::finest());
ClassLoaderDataGraph::free_deallocate_lists();
}
}
if (G1StringDedup::is_enabled()) {