mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
7166894: Add gc cause to GC logging for all collectors
Reviewed-by: mgerdin, johnc
This commit is contained in:
parent
b2d4591455
commit
eba9965d54
16 changed files with 75 additions and 54 deletions
|
@ -6332,10 +6332,10 @@ void CMSCollector::reset(bool asynch) {
|
|||
)
|
||||
}
|
||||
|
||||
void CMSCollector::do_CMS_operation(CMS_op_type op) {
|
||||
void CMSCollector::do_CMS_operation(CMS_op_type op, GCCause::Cause gc_cause) {
|
||||
gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps);
|
||||
TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
|
||||
TraceTime t("GC", PrintGC, !PrintGCDetails, gclog_or_tty);
|
||||
TraceTime t(GCCauseString("GC", gc_cause), PrintGC, !PrintGCDetails, gclog_or_tty);
|
||||
TraceCollectorStats tcs(counters());
|
||||
|
||||
switch (op) {
|
||||
|
|
|
@ -717,7 +717,7 @@ class CMSCollector: public CHeapObj {
|
|||
CMS_op_checkpointRootsFinal
|
||||
};
|
||||
|
||||
void do_CMS_operation(CMS_op_type op);
|
||||
void do_CMS_operation(CMS_op_type op, GCCause::Cause gc_cause);
|
||||
bool stop_world_and_do(CMS_op_type op);
|
||||
|
||||
OopTaskQueueSet* task_queues() { return _task_queues; }
|
||||
|
|
|
@ -146,7 +146,7 @@ void VM_CMS_Initial_Mark::doit() {
|
|||
VM_CMS_Operation::verify_before_gc();
|
||||
|
||||
IsGCActiveMark x; // stop-world GC active
|
||||
_collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsInitial);
|
||||
_collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsInitial, gch->gc_cause());
|
||||
|
||||
VM_CMS_Operation::verify_after_gc();
|
||||
#ifndef USDT2
|
||||
|
@ -178,7 +178,7 @@ void VM_CMS_Final_Remark::doit() {
|
|||
VM_CMS_Operation::verify_before_gc();
|
||||
|
||||
IsGCActiveMark x; // stop-world GC active
|
||||
_collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsFinal);
|
||||
_collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsFinal, gch->gc_cause());
|
||||
|
||||
VM_CMS_Operation::verify_after_gc();
|
||||
#ifndef USDT2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue