changeset 29339:f0b1b7788a51

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
author thartmann
date Mon, 23 Feb 2015 10:38:26 +0100
parents 92297a8bd48e
children e5ee51840b93 dedd5ddb0f95
files hotspot/src/share/vm/runtime/sweeper.cpp
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.