Bug 721794 - add SPS labels for CC entry points. r=smaug

This commit is contained in:
Andrew McCreight 2012-01-31 13:47:47 -08:00
parent 6eea252eb2
commit 92c993fb12

@ -157,6 +157,7 @@
#include "nsIMemoryReporter.h"
#include "xpcpublic.h"
#include "nsXPCOMPrivate.h"
#include "sampler.h"
#include <stdio.h>
#include <string.h>
#ifdef WIN32
@ -3839,6 +3840,7 @@ void
nsCycleCollector_forgetSkippable()
{
if (sCollector) {
SAMPLE_LABEL("CC", "nsCycleCollector_forgetSkippable");
sCollector->ForgetSkippable();
}
}
@ -3847,6 +3849,7 @@ PRUint32
nsCycleCollector_collect(nsICycleCollectorListener *aListener)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
SAMPLE_LABEL("CC", "nsCycleCollector_collect");
nsCOMPtr<nsICycleCollectorListener> listener(aListener);
if (!aListener && sCollector && sCollector->mParams.mLogGraphs) {
listener = new nsCycleCollectorLogger();
@ -3882,6 +3885,7 @@ nsCycleCollector_shutdown()
NS_ASSERTION(!sCollectorThread, "Should have finished before!");
if (sCollector) {
SAMPLE_LABEL("CC", "nsCycleCollector_shutdown");
sCollector->Shutdown();
delete sCollector;
sCollector = nsnull;