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
--- 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.