From 54ca2d48eec947d6fa8c839b1460b66a487debba Mon Sep 17 00:00:00 2001 From: Hannes Verschore Date: Fri, 19 Jul 2013 10:41:32 -0700 Subject: [PATCH] Bug 895019 - Tracelogger: Add logger for minor gc, r=jandem --- js/src/TraceLogging.cpp | 2 ++ js/src/TraceLogging.h | 2 ++ js/src/jsgc.cpp | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/js/src/TraceLogging.cpp b/js/src/TraceLogging.cpp index 5c0e3a68eee2..954581aa0bc2 100644 --- a/js/src/TraceLogging.cpp +++ b/js/src/TraceLogging.cpp @@ -70,6 +70,8 @@ const char* const TraceLogging::type_name[] = { "stop,yarr_jit_execute", "start,gc", "stop,gc", + "start,minor_gc", + "stop,minor_gc", "info,engine,interpreter", "info,engine,baseline", "info,engine,ionmonkey" diff --git a/js/src/TraceLogging.h b/js/src/TraceLogging.h index 63052777a0d7..876d551477b8 100644 --- a/js/src/TraceLogging.h +++ b/js/src/TraceLogging.h @@ -23,6 +23,8 @@ class TraceLogging YARR_JIT_STOP, GC_START, GC_STOP, + MINOR_GC_START, + MINOR_GC_STOP, INFO_ENGINE_INTERPRETER, INFO_ENGINE_BASELINE, INFO_ENGINE_IONMONKEY, diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 0d3b8b8bc36c..38ad58983ecc 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -4677,6 +4677,11 @@ void js::MinorGC(JSRuntime *rt, JS::gcreason::Reason reason) { #ifdef JSGC_GENERATIONAL +#if JS_TRACE_LOGGING + AutoTraceLog logger(TraceLogging::defaultLogger(), + TraceLogging::MINOR_GC_START, + TraceLogging::MINOR_GC_STOP); +#endif rt->gcNursery.collect(rt, reason); #endif }