Projects
openEuler:24.03:SP1:Everything
openjdk-1.8.0
_service:tar_scm:enhance-java-heap-oom-err-log....
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:enhance-java-heap-oom-err-log.patch of Package openjdk-1.8.0
From 2e7ce3a50aca6b0633e2fb7b2d0ef3c9e7b6ebc4 Mon Sep 17 00:00:00 2001 Date: Thu, 27 Jul 2023 19:53:53 +0800 Subject: [PATCH] [Huawei]enhance java-heap-oom err log --- .../src/share/vm/gc_interface/collectedHeap.inline.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/gc_interface/collectedHeap.inline.hpp b/hotspot/src/share/vm/gc_interface/collectedHeap.inline.hpp index 8ed2df96a..ab4827a9b 100644 --- a/hotspot/src/share/vm/gc_interface/collectedHeap.inline.hpp +++ b/hotspot/src/share/vm/gc_interface/collectedHeap.inline.hpp @@ -156,8 +156,16 @@ HeapWord* CollectedHeap::common_mem_allocate_noinit(KlassHandle klass, size_t si if (!gc_overhead_limit_was_exceeded) { + ResourceMark rm; + tty->print_cr("OOM caused by java heap space occurred, allocate size: %zu bytes, type: %s", size * HeapWordSize, klass->signature_name()); + Universe::heap()->print_on(tty); + + if (THREAD->is_Java_thread()) { + tty->print_cr("current stack trace:"); + ((JavaThread*)THREAD)->print_stack_on(tty); + } // -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support - report_java_out_of_memory("Java heap space"); + report_java_out_of_memory(err_msg("Java heap space, allocate size: %zu bytes, type: %s", size * HeapWordSize, klass->signature_name())); if (JvmtiExport::should_post_resource_exhausted()) { JvmtiExport::post_resource_exhausted( -- 2.19.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2