Mercurial > hg > openjdk > jdk8u > hotspot
changeset 8471:77e13f15e396
8164293: HotSpot leaking memory in long-running requests
Summary: Applied RMs in sweep_code_cache and related codes.
Reviewed-by: kvn, thartmann
author | jcm |
---|---|
date | Wed, 11 Jan 2017 04:26:49 -0800 |
parents | 9deaba76a094 |
children | 98e7171e0372 |
files | src/share/vm/code/nmethod.cpp src/share/vm/runtime/sweeper.cpp |
diffstat | 2 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp Tue Mar 21 12:20:10 2017 -0700 +++ b/src/share/vm/code/nmethod.cpp Wed Jan 11 04:26:49 2017 -0800 @@ -1151,6 +1151,7 @@ // Clear ICStubs of all compiled ICs void nmethod::clear_ic_stubs() { assert_locked_or_safepoint(CompiledIC_lock); + ResourceMark rm; RelocIterator iter(this); while(iter.next()) { if (iter.type() == relocInfo::virtual_call_type) {
--- a/src/share/vm/runtime/sweeper.cpp Tue Mar 21 12:20:10 2017 -0700 +++ 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.