зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1249932 - indicate in the GC and CC log (browser console) whether it is about default or content process, r=mccr8
--HG-- extra : rebase_source : 94554d4651face04b90c6b9f1458d08f67be4a0b
This commit is contained in:
Родитель
4376359dd4
Коммит
c244a5179d
|
@ -216,6 +216,13 @@ static bool sIsCompactingOnUserInactive = false;
|
|||
static int32_t sExpensiveCollectorPokes = 0;
|
||||
static const int32_t kPokesBetweenExpensiveCollectorTriggers = 5;
|
||||
|
||||
static const char*
|
||||
ProcessNameForCollectorLog()
|
||||
{
|
||||
return XRE_GetProcessType() == GeckoProcessType_Default ?
|
||||
"default" : "content";
|
||||
}
|
||||
|
||||
static PRTime
|
||||
GetCollectionTimeDelta()
|
||||
{
|
||||
|
@ -1718,10 +1725,11 @@ nsJSContext::EndCycleCollectionCallback(CycleCollectorResults &aResults)
|
|||
}
|
||||
|
||||
NS_NAMED_MULTILINE_LITERAL_STRING(kFmt,
|
||||
MOZ_UTF16("CC(T+%.1f) max pause: %lums, total time: %lums, slices: %lu, suspected: %lu, visited: %lu RCed and %lu%s GCed, collected: %lu RCed and %lu GCed (%lu|%lu|%lu waiting for GC)%s\n")
|
||||
MOZ_UTF16("CC(T+%.1f)[%s] max pause: %lums, total time: %lums, slices: %lu, suspected: %lu, visited: %lu RCed and %lu%s GCed, collected: %lu RCed and %lu GCed (%lu|%lu|%lu waiting for GC)%s\n")
|
||||
MOZ_UTF16("ForgetSkippable %lu times before CC, min: %lu ms, max: %lu ms, avg: %lu ms, total: %lu ms, max sync: %lu ms, removed: %lu"));
|
||||
nsString msg;
|
||||
msg.Adopt(nsTextFormatter::smprintf(kFmt.get(), double(delta) / PR_USEC_PER_SEC,
|
||||
ProcessNameForCollectorLog(),
|
||||
gCCStats.mMaxSliceTime, gCCStats.mTotalSliceTime,
|
||||
aResults.mNumSlices, gCCStats.mSuspected,
|
||||
aResults.mVisitedRefCounted, aResults.mVisitedGCed, mergeMsg.get(),
|
||||
|
@ -2244,11 +2252,12 @@ DOMGCSliceCallback(JSRuntime *aRt, JS::GCProgress aProgress, const JS::GCDescrip
|
|||
PRTime delta = GetCollectionTimeDelta();
|
||||
|
||||
if (sPostGCEventsToConsole) {
|
||||
NS_NAMED_LITERAL_STRING(kFmt, "GC(T+%.1f) ");
|
||||
NS_NAMED_LITERAL_STRING(kFmt, "GC(T+%.1f)[%s] ");
|
||||
nsString prefix, gcstats;
|
||||
gcstats.Adopt(aDesc.formatSummaryMessage(aRt));
|
||||
prefix.Adopt(nsTextFormatter::smprintf(kFmt.get(),
|
||||
double(delta) / PR_USEC_PER_SEC));
|
||||
double(delta) / PR_USEC_PER_SEC,
|
||||
ProcessNameForCollectorLog()));
|
||||
nsString msg = prefix + gcstats;
|
||||
nsCOMPtr<nsIConsoleService> cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID);
|
||||
if (cs) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче