diff -r c7140a91e56a -r 8dfbb002197a src/share/vm/runtime/sweeper.cpp --- a/src/share/vm/runtime/sweeper.cpp Thu Jan 05 18:55:20 2017 -0500 +++ b/src/share/vm/runtime/sweeper.cpp Wed Jan 11 04:26:49 2017 -0800 @@ -319,6 +319,7 @@ } void NMethodSweeper::sweep_code_cache() { + ResourceMark rm; Ticks sweep_start_counter = Ticks::now(); _flushed_count = 0; @@ -626,6 +627,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. @@ -643,6 +645,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.