mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
6361589: Print out stack trace for target thread of GC crash
If GC crashed with java thread involved, print out the java stack trace in error report Reviewed-by: never, ysr, coleenp, dholmes
This commit is contained in:
parent
baf249687c
commit
4f656a451e
8 changed files with 74 additions and 9 deletions
|
@ -48,7 +48,12 @@ class IdealGraphPrinter;
|
|||
|
||||
// Class hierarchy
|
||||
// - Thread
|
||||
// - VMThread
|
||||
// - NamedThread
|
||||
// - VMThread
|
||||
// - ConcurrentGCThread
|
||||
// - WorkerThread
|
||||
// - GangWorker
|
||||
// - GCTaskThread
|
||||
// - JavaThread
|
||||
// - WatcherThread
|
||||
|
||||
|
@ -249,6 +254,7 @@ class Thread: public ThreadShadow {
|
|||
virtual bool is_GC_task_thread() const { return false; }
|
||||
virtual bool is_Watcher_thread() const { return false; }
|
||||
virtual bool is_ConcurrentGC_thread() const { return false; }
|
||||
virtual bool is_Named_thread() const { return false; }
|
||||
|
||||
virtual char* name() const { return (char*)"Unknown thread"; }
|
||||
|
||||
|
@ -568,12 +574,18 @@ class NamedThread: public Thread {
|
|||
};
|
||||
private:
|
||||
char* _name;
|
||||
// log JavaThread being processed by oops_do
|
||||
JavaThread* _processed_thread;
|
||||
|
||||
public:
|
||||
NamedThread();
|
||||
~NamedThread();
|
||||
// May only be called once per thread.
|
||||
void set_name(const char* format, ...);
|
||||
virtual bool is_Named_thread() const { return true; }
|
||||
virtual char* name() const { return _name == NULL ? (char*)"Unknown Thread" : _name; }
|
||||
JavaThread *processed_thread() { return _processed_thread; }
|
||||
void set_processed_thread(JavaThread *thread) { _processed_thread = thread; }
|
||||
};
|
||||
|
||||
// Worker threads are named and have an id of an assigned work.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue