|
|
8bbad9 |
# HG changeset patch
|
|
|
8bbad9 |
# User jcm
|
|
|
8bbad9 |
# Date 1484137609 28800
|
|
|
8bbad9 |
# Wed Jan 11 04:26:49 2017 -0800
|
|
|
8bbad9 |
# Node ID 1faf7c17089922f6f72b580253725f2ecb6ba2f8
|
|
|
8bbad9 |
# Parent 3d07e14d65bc223dbfe94be9224e4aa8c6e63762
|
|
|
8bbad9 |
8164293, PR3412, RH1459641: HotSpot leaking memory in long-running requests
|
|
|
8bbad9 |
Summary: Applied RMs in sweep_code_cache and related codes.
|
|
|
8bbad9 |
Reviewed-by: kvn, thartmann
|
|
|
8bbad9 |
|
|
|
8bbad9 |
diff --git a/src/share/vm/code/nmethod.cpp b/src/share/vm/code/nmethod.cpp
|
|
|
8bbad9 |
--- openjdk/hotspot/src/share/vm/code/nmethod.cpp
|
|
|
8bbad9 |
+++ openjdk/hotspot/src/share/vm/code/nmethod.cpp
|
|
|
8bbad9 |
@@ -1172,6 +1172,7 @@
|
|
|
8bbad9 |
// Clear ICStubs of all compiled ICs
|
|
|
8bbad9 |
void nmethod::clear_ic_stubs() {
|
|
|
8bbad9 |
assert_locked_or_safepoint(CompiledIC_lock);
|
|
|
8bbad9 |
+ ResourceMark rm;
|
|
|
8bbad9 |
RelocIterator iter(this);
|
|
|
8bbad9 |
while(iter.next()) {
|
|
|
8bbad9 |
if (iter.type() == relocInfo::virtual_call_type) {
|
|
|
8bbad9 |
diff --git a/src/share/vm/runtime/sweeper.cpp b/src/share/vm/runtime/sweeper.cpp
|
|
|
8bbad9 |
--- openjdk/hotspot/src/share/vm/runtime/sweeper.cpp
|
|
|
8bbad9 |
+++ openjdk/hotspot/src/share/vm/runtime/sweeper.cpp
|
|
|
8bbad9 |
@@ -319,6 +319,7 @@
|
|
|
8bbad9 |
}
|
|
|
8bbad9 |
|
|
|
8bbad9 |
void NMethodSweeper::sweep_code_cache() {
|
|
|
8bbad9 |
+ ResourceMark rm;
|
|
|
8bbad9 |
Ticks sweep_start_counter = Ticks::now();
|
|
|
8bbad9 |
|
|
|
8bbad9 |
_flushed_count = 0;
|
|
|
8bbad9 |
@@ -626,6 +627,7 @@
|
|
|
8bbad9 |
// state of the code cache if it's requested.
|
|
|
8bbad9 |
void NMethodSweeper::log_sweep(const char* msg, const char* format, ...) {
|
|
|
8bbad9 |
if (PrintMethodFlushing) {
|
|
|
8bbad9 |
+ ResourceMark rm;
|
|
|
8bbad9 |
stringStream s;
|
|
|
8bbad9 |
// Dump code cache state into a buffer before locking the tty,
|
|
|
8bbad9 |
// because log_state() will use locks causing lock conflicts.
|
|
|
8bbad9 |
@@ -643,6 +645,7 @@
|
|
|
8bbad9 |
}
|
|
|
8bbad9 |
|
|
|
8bbad9 |
if (LogCompilation && (xtty != NULL)) {
|
|
|
8bbad9 |
+ ResourceMark rm;
|
|
|
8bbad9 |
stringStream s;
|
|
|
8bbad9 |
// Dump code cache state into a buffer before locking the tty,
|
|
|
8bbad9 |
// because log_state() will use locks causing lock conflicts.
|