Skip to content

Commit a7a0913

Browse files
quadhierThomas Schatzl
authored andcommitted
8309346: Extend hs_err logging for all VM operations deriving from VM_GC_Operation
Reviewed-by: tschatzl, stefank
1 parent 3b85f84 commit a7a0913

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/hotspot/share/gc/shared/gcVMOperations.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ VM_GC_Operation::~VM_GC_Operation() {
6868
ch->soft_ref_policy()->set_all_soft_refs_clear(false);
6969
}
7070

71+
const char* VM_GC_Operation::cause() const {
72+
return GCCause::to_string(_gc_cause);
73+
}
74+
7175
// The same dtrace probe can't be inserted in two different files, so we
7276
// have to call it here, so it's only in one file. Can't create new probes
7377
// for the other file anymore. The dtrace probes have to remain stable.

src/hotspot/share/gc/shared/gcVMOperations.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ class VM_GC_Operation: public VM_GC_Sync_Operation {
137137
}
138138
~VM_GC_Operation();
139139

140+
virtual const char* cause() const;
141+
140142
// Acquire the Heap_lock and determine if this VM operation should be executed
141143
// (i.e. not skipped). Return this result, and also store it in _prologue_succeeded.
142144
virtual bool doit_prologue();

0 commit comments

Comments
 (0)