reading thread name
Nagy1981
nagy.mostafa at gmail.com
Thu Jul 10 17:16:06 PDT 2008
Hi,
I am modifying the CPP Interpreter such that the InterpreterRuntime function
below gets invoked on each Java bytecode method call:
IRT_ENTRY(void, InterpreterRuntime::CCT_update(JavaThread *thread, int
type))
static methodOop current = NULL; // calling method
static int bci = -1; // call-site
// ignore non-java threads
if (!thread->is_Java_thread())
return;
// ignore non-named threads
if (strcmp(thread->name(), "Unknown Thread") == 0)
return;
...
The funtion should return, if the name of the thread is "Unknown Thread".
This works fine for a simple HelloWorld program, but when I try one of
DaCapo benchmarks the execution fails with the following error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate.
Out of swap space?
#
# Internal Error (allocation.cpp:117), pid=27659, tid=3084180368
# Error: ChunkPool::allocate
#
# Java VM: OpenJDK Server VM (13.0-b02 interpreted mode linux-x86 )
# An error report file with more information is saved as:
# /home/nagy/research/hotspot/test/hs_err_pid27659.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted
After trying to debug the code, I found that the problem is with the call to
thread->name(). When I remove it, the execution terminates successfully. It
seems that successive calls to thread->name() induces some sort of memory
leakage. Is this a bug in hotspot or is there something I am missing here ?
thanks,
- nagy
--
View this message in context: http://www.nabble.com/reading-thread-name-tp18394454p18394454.html
Sent from the OpenJDK Hotspot Compiler Development List mailing list archive at Nabble.com.
More information about the hotspot-compiler-dev
mailing list