8027364: PSScavenge accounts too large code section to StringTable unlink
authortschatzl
Tue, 07 Jan 2014 13:31:33 +0100
changeset 22205 8ee59199b85d
parent 22204 eef85c68cec0
child 22206 dfbfc5483c3e
8027364: PSScavenge accounts too large code section to StringTable unlink Summary: Correct timing measurement by modifying the scope of the GCTraceTime instance. Reviewed-by: ysr, tamao Contributed-by: Jeremy Manson <jeremymanson@google.com>
hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Mon Dec 16 13:43:06 2013 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Tue Jan 07 13:31:33 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -466,10 +466,12 @@
       }
     }
 
-    GCTraceTime tm("StringTable", false, false, &_gc_timer);
-    // Unlink any dead interned Strings and process the remaining live ones.
-    PSScavengeRootsClosure root_closure(promotion_manager);
-    StringTable::unlink_or_oops_do(&_is_alive_closure, &root_closure);
+    {
+      GCTraceTime tm("StringTable", false, false, &_gc_timer);
+      // Unlink any dead interned Strings and process the remaining live ones.
+      PSScavengeRootsClosure root_closure(promotion_manager);
+      StringTable::unlink_or_oops_do(&_is_alive_closure, &root_closure);
+    }
 
     // Finally, flush the promotion_manager's labs, and deallocate its stacks.
     promotion_failure_occurred = PSPromotionManager::post_scavenge(_gc_tracer);