8073257: compiler/codecache/stress/RandomAllocationTest.java + fastdebug + -XX:+LogCompilation, "allocating without ResourceMark"
authorthartmann
Mon, 23 Feb 2015 10:38:26 +0100
changeset 29339 f0b1b7788a51
parent 29338 92297a8bd48e
child 29340 e5ee51840b93
child 29341 dedd5ddb0f95
8073257: compiler/codecache/stress/RandomAllocationTest.java + fastdebug + -XX:+LogCompilation, "allocating without ResourceMark" Summary: Added two missing ResourceMarks to 'NMethodSweeper::log_sweep'. Reviewed-by: kvn, iignatyev
hotspot/src/share/vm/runtime/sweeper.cpp
--- a/hotspot/src/share/vm/runtime/sweeper.cpp	Mon Feb 23 07:55:37 2015 +0100
+++ b/hotspot/src/share/vm/runtime/sweeper.cpp	Mon Feb 23 10:38:26 2015 +0100
@@ -724,6 +724,7 @@
 // state of the code cache if it's requested.
 void NMethodSweeper::log_sweep(const char* msg, const char* format, ...) {
   if (PrintMethodFlushing) {
+    ResourceMark rm;
     stringStream s;
     // Dump code cache state into a buffer before locking the tty,
     // because log_state() will use locks causing lock conflicts.
@@ -741,6 +742,7 @@
   }
 
   if (LogCompilation && (xtty != NULL)) {
+    ResourceMark rm;
     stringStream s;
     // Dump code cache state into a buffer before locking the tty,
     // because log_state() will use locks causing lock conflicts.