From 5c45d906eb53a773babe5d857988280395ebb5ed Mon Sep 17 00:00:00 2001 From: vlivanov Date: Fri, 1 Feb 2013 02:50:23 -0800 Subject: [PATCH] 8006410: allocating without ResourceMark when CompileCommand was specified Reviewed-by: kvn, vlivanov Contributed-by: Igor Ignatyev --- src/share/vm/ci/ciEnv.cpp | 2 +- src/share/vm/ci/ciInstanceKlass.cpp | 3 +++ src/share/vm/ci/ciMethod.cpp | 1 + src/share/vm/ci/ciMethodData.cpp | 1 + src/share/vm/oops/symbol.cpp | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/share/vm/ci/ciEnv.cpp b/src/share/vm/ci/ciEnv.cpp index bb51f88c7..de0bd0825 100644 --- a/src/share/vm/ci/ciEnv.cpp +++ b/src/share/vm/ci/ciEnv.cpp @@ -1168,7 +1168,7 @@ void ciEnv::dump_replay_data() { void ciEnv::dump_replay_data(outputStream* out) { ASSERT_IN_VM; - + ResourceMark rm; #if INCLUDE_JVMTI out->print_cr("JvmtiExport can_access_local_variables %d", _jvmti_can_access_local_variables); out->print_cr("JvmtiExport can_hotswap_or_post_breakpoint %d", _jvmti_can_hotswap_or_post_breakpoint); diff --git a/src/share/vm/ci/ciInstanceKlass.cpp b/src/share/vm/ci/ciInstanceKlass.cpp index de5e973bf..d74e3693a 100644 --- a/src/share/vm/ci/ciInstanceKlass.cpp +++ b/src/share/vm/ci/ciInstanceKlass.cpp @@ -580,6 +580,7 @@ class StaticFinalFieldPrinter : public FieldClosure { } void do_field(fieldDescriptor* fd) { if (fd->is_final() && !fd->has_initial_value()) { + ResourceMark rm; oop mirror = fd->field_holder()->java_mirror(); _out->print("staticfield %s %s %s ", _holder, fd->name()->as_quoted_ascii(), fd->signature()->as_quoted_ascii()); switch (fd->field_type()) { @@ -643,6 +644,8 @@ class StaticFinalFieldPrinter : public FieldClosure { void ciInstanceKlass::dump_replay_data(outputStream* out) { ASSERT_IN_VM; + ResourceMark rm; + InstanceKlass* ik = get_instanceKlass(); ConstantPool* cp = ik->constants(); diff --git a/src/share/vm/ci/ciMethod.cpp b/src/share/vm/ci/ciMethod.cpp index 8ad9ecb11..e5c5e72de 100644 --- a/src/share/vm/ci/ciMethod.cpp +++ b/src/share/vm/ci/ciMethod.cpp @@ -1178,6 +1178,7 @@ ciMethodBlocks *ciMethod::get_method_blocks() { void ciMethod::dump_replay_data(outputStream* st) { ASSERT_IN_VM; + ResourceMark rm; Method* method = get_Method(); Klass* holder = method->method_holder(); st->print_cr("ciMethod %s %s %s %d %d %d %d %d", diff --git a/src/share/vm/ci/ciMethodData.cpp b/src/share/vm/ci/ciMethodData.cpp index ee5490be8..c30c6c364 100644 --- a/src/share/vm/ci/ciMethodData.cpp +++ b/src/share/vm/ci/ciMethodData.cpp @@ -374,6 +374,7 @@ void ciMethodData::print_impl(outputStream* st) { void ciMethodData::dump_replay_data(outputStream* out) { ASSERT_IN_VM; + ResourceMark rm; MethodData* mdo = get_MethodData(); Method* method = mdo->method(); Klass* holder = method->method_holder(); diff --git a/src/share/vm/oops/symbol.cpp b/src/share/vm/oops/symbol.cpp index f2253dbcc..546018992 100644 --- a/src/share/vm/oops/symbol.cpp +++ b/src/share/vm/oops/symbol.cpp @@ -152,6 +152,7 @@ char* Symbol::as_C_string_flexible_buffer(Thread* t, } void Symbol::print_symbol_on(outputStream* st) const { + ResourceMark rm; st = st ? st : tty; st->print("%s", as_quoted_ascii()); } -- GitLab