зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1752861 - [profiler] Expose GC and CC operations to the JS view r=sfink,smaug
Differential Revision: https://phabricator.services.mozilla.com/D140390
This commit is contained in:
Родитель
830ac30ee4
Коммит
2e9e2ccdd2
|
@ -1081,6 +1081,7 @@ void nsJSContext::GarbageCollectNow(JS::GCReason aReason,
|
|||
void nsJSContext::RunIncrementalGCSlice(JS::GCReason aReason,
|
||||
IsShrinking aShrinking,
|
||||
js::SliceBudget& aBudget) {
|
||||
AUTO_PROFILER_LABEL_RELEVANT_FOR_JS("Incremental GC", GCCC);
|
||||
GarbageCollectImpl(aReason, aShrinking, aBudget);
|
||||
}
|
||||
|
||||
|
@ -1415,8 +1416,6 @@ void nsJSContext::RunCycleCollectorSlice(CCReason aReason,
|
|||
AUTO_PROFILER_MARKER_TEXT("CCSlice", GCCC, {},
|
||||
aDeadline.IsNull() ? ""_ns : "(idle)"_ns);
|
||||
|
||||
AUTO_PROFILER_LABEL("nsJSContext::RunCycleCollectorSlice", GCCC);
|
||||
|
||||
PrepareForCycleCollectionSlice(aReason, aDeadline);
|
||||
|
||||
// Decide how long we want to budget for this slice.
|
||||
|
@ -1529,6 +1528,8 @@ void nsJSContext::EndCycleCollectionCallback(CycleCollectorResults& aResults) {
|
|||
|
||||
/* static */
|
||||
bool CCGCScheduler::CCRunnerFired(TimeStamp aDeadline) {
|
||||
AUTO_PROFILER_LABEL_RELEVANT_FOR_JS("Incremental CC", GCCC);
|
||||
|
||||
bool didDoWork = false;
|
||||
|
||||
// The CC/GC scheduler (sScheduler) decides what action(s) to take during
|
||||
|
|
|
@ -140,6 +140,7 @@ const char* const XPCJSRuntime::mStrings[] = {
|
|||
class AsyncFreeSnowWhite : public Runnable {
|
||||
public:
|
||||
NS_IMETHOD Run() override {
|
||||
AUTO_PROFILER_LABEL_RELEVANT_FOR_JS("Incremental CC", GCCC);
|
||||
AUTO_PROFILER_LABEL("AsyncFreeSnowWhite::Run", GCCC_FreeSnowWhite);
|
||||
|
||||
TimeStamp start = TimeStamp::Now();
|
||||
|
|
|
@ -3370,6 +3370,8 @@ bool nsCycleCollector::Collect(CCReason aReason, ccIsManual aIsManual,
|
|||
SliceBudget& aBudget,
|
||||
nsICycleCollectorListener* aManualListener,
|
||||
bool aPreferShorterSlices) {
|
||||
AUTO_PROFILER_LABEL_RELEVANT_FOR_JS("Incremental CC", GCCC);
|
||||
|
||||
CheckThreadSafety();
|
||||
|
||||
// This can legitimately happen in a few cases. See bug 383651.
|
||||
|
@ -3854,8 +3856,6 @@ void nsCycleCollector_forgetSkippable(js::SliceBudget& aBudget,
|
|||
MOZ_ASSERT(data);
|
||||
MOZ_ASSERT(data->mCollector);
|
||||
|
||||
AUTO_PROFILER_LABEL("nsCycleCollector_forgetSkippable", GCCC);
|
||||
|
||||
TimeLog timeLog;
|
||||
data->mCollector->ForgetSkippable(aBudget, aRemoveChildlessNodes,
|
||||
aAsyncSnowWhiteFreeing);
|
||||
|
|
Загрузка…
Ссылка в новой задаче