Skip to content

Commit

Permalink
Bug 1462784 - Merge GC and CC categories into one category. r=njn
Browse files Browse the repository at this point in the history
They're very similar as far as most users of the profiler are concerned, I'd
say, and I don't believe it's worth giving them two different colors in the
activity graphs.

MozReview-Commit-ID: HTqjp56naL3

--HG--
extra : rebase_source : f172424042fab18a514201ba4b6c67c03c209cdb
  • Loading branch information
mstange committed May 18, 2018
1 parent edf8428 commit 11931d3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dom/base/nsDOMWindowUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ nsDOMWindowUtils::GetWidgetForElement(Element* aElement)
NS_IMETHODIMP
nsDOMWindowUtils::GarbageCollect(nsICycleCollectorListener *aListener)
{
AUTO_PROFILER_LABEL("nsDOMWindowUtils::GarbageCollect", GC);
AUTO_PROFILER_LABEL("nsDOMWindowUtils::GarbageCollect", GCCC);

nsJSContext::GarbageCollectNow(JS::gcreason::DOM_UTILS);
nsJSContext::CycleCollectNow(aListener);
Expand Down
10 changes: 5 additions & 5 deletions dom/base/nsJSEnvironment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ nsJSContext::GarbageCollectNow(JS::gcreason::Reason aReason,
IsShrinking aShrinking,
int64_t aSliceMillis)
{
AUTO_PROFILER_LABEL_DYNAMIC_CSTR("nsJSContext::GarbageCollectNow", GC,
AUTO_PROFILER_LABEL_DYNAMIC_CSTR("nsJSContext::GarbageCollectNow", GCCC,
JS::gcreason::ExplainReason(aReason));

MOZ_ASSERT_IF(aSliceMillis, aIncremental == IncrementalGC);
Expand Down Expand Up @@ -1231,7 +1231,7 @@ nsJSContext::GarbageCollectNow(JS::gcreason::Reason aReason,
static void
FinishAnyIncrementalGC()
{
AUTO_PROFILER_LABEL("FinishAnyIncrementalGC", GC);
AUTO_PROFILER_LABEL("FinishAnyIncrementalGC", GCCC);

if (sCCLockedOut) {
AutoJSAPI jsapi;
Expand Down Expand Up @@ -1482,7 +1482,7 @@ nsJSContext::CycleCollectNow(nsICycleCollectorListener *aListener)
return;
}

AUTO_PROFILER_LABEL("nsJSContext::CycleCollectNow", CC);
AUTO_PROFILER_LABEL("nsJSContext::CycleCollectNow", GCCC);

gCCStats.PrepareForCycleCollectionSlice(TimeStamp());
nsCycleCollector_collect(aListener);
Expand All @@ -1499,7 +1499,7 @@ nsJSContext::RunCycleCollectorSlice(TimeStamp aDeadline)

AUTO_PROFILER_TRACING("CC", aDeadline.IsNull() ? "CCSlice" : "IdleCCSlice");

AUTO_PROFILER_LABEL("nsJSContext::RunCycleCollectorSlice", CC);
AUTO_PROFILER_LABEL("nsJSContext::RunCycleCollectorSlice", GCCC);

gCCStats.PrepareForCycleCollectionSlice(aDeadline);

Expand Down Expand Up @@ -1557,7 +1557,7 @@ nsJSContext::RunCycleCollectorWorkSlice(int64_t aWorkBudget)
return;
}

AUTO_PROFILER_LABEL("nsJSContext::RunCycleCollectorWorkSlice", CC);
AUTO_PROFILER_LABEL("nsJSContext::RunCycleCollectorWorkSlice", GCCC);

gCCStats.PrepareForCycleCollectionSlice();

Expand Down
3 changes: 1 addition & 2 deletions js/public/ProfilingStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ class ProfilingStackFrame
OTHER,
CSS,
JS,
GC,
CC,
GCCC,
NETWORK,
GRAPHICS,
STORAGE,
Expand Down
2 changes: 1 addition & 1 deletion js/src/gc/GC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6824,7 +6824,7 @@ AutoTraceSession::AutoTraceSession(JSRuntime* rt, JS::HeapState heapState)
: runtime(rt),
prevState(rt->mainContextFromOwnThread()->heapState),
profilingStackFrame(rt->mainContextFromOwnThread(), HeapStateToLabel(heapState),
ProfilingStackFrame::Category::GC)
ProfilingStackFrame::Category::GCCC)
{
MOZ_ASSERT(prevState == JS::HeapState::Idle);
MOZ_ASSERT(heapState != JS::HeapState::Idle);
Expand Down
8 changes: 4 additions & 4 deletions xpcom/base/nsCycleCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4262,7 +4262,7 @@ nsCycleCollector_forgetSkippable(js::SliceBudget& aBudget,
MOZ_ASSERT(data);
MOZ_ASSERT(data->mCollector);

AUTO_PROFILER_LABEL("nsCycleCollector_forgetSkippable", CC);
AUTO_PROFILER_LABEL("nsCycleCollector_forgetSkippable", GCCC);

TimeLog timeLog;
data->mCollector->ForgetSkippable(aBudget,
Expand Down Expand Up @@ -4309,7 +4309,7 @@ nsCycleCollector_collect(nsICycleCollectorListener* aManualListener)
MOZ_ASSERT(data);
MOZ_ASSERT(data->mCollector);

AUTO_PROFILER_LABEL("nsCycleCollector_collect", CC);
AUTO_PROFILER_LABEL("nsCycleCollector_collect", GCCC);

SliceBudget unlimitedBudget = SliceBudget::unlimited();
data->mCollector->Collect(ManualCC, unlimitedBudget, aManualListener);
Expand All @@ -4325,7 +4325,7 @@ nsCycleCollector_collectSlice(SliceBudget& budget,
MOZ_ASSERT(data);
MOZ_ASSERT(data->mCollector);

AUTO_PROFILER_LABEL("nsCycleCollector_collectSlice", CC);
AUTO_PROFILER_LABEL("nsCycleCollector_collectSlice", GCCC);

data->mCollector->Collect(SliceCC, budget, nullptr, aPreferShorterSlices);
}
Expand Down Expand Up @@ -4365,7 +4365,7 @@ nsCycleCollector_shutdown(bool aDoCollect)

if (data) {
MOZ_ASSERT(data->mCollector);
AUTO_PROFILER_LABEL("nsCycleCollector_shutdown", CC);
AUTO_PROFILER_LABEL("nsCycleCollector_shutdown", OTHER);

if (gMainThreadCollector == data->mCollector) {
gMainThreadCollector = nullptr;
Expand Down

0 comments on commit 11931d3

Please sign in to comment.