Bug 1121576 - Profile the compositor thread by default. r=BenWa

This commit is contained in:
Markus Stange 2015-01-14 19:05:25 -05:00
parent cb9f937f27
commit e79454c2cb

View File

@ -11,6 +11,7 @@
#include "platform.h"
#include "PlatformMacros.h"
#include "prenv.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/ThreadLocal.h"
#include "PseudoStack.h"
@ -572,6 +573,7 @@ void mozilla_sampler_init(void* stackTop)
const char* features[] = {"js"
, "leaf"
, "threads"
#if defined(XP_WIN) || defined(XP_MACOSX) || (defined(SPS_ARCH_arm) && defined(linux))
, "stackwalk"
#endif
@ -579,10 +581,12 @@ void mozilla_sampler_init(void* stackTop)
, "java"
#endif
};
const char* threadFilters[] = { "GeckoMain", "Compositor" };
profiler_start(PROFILE_DEFAULT_ENTRY, PROFILE_DEFAULT_INTERVAL,
features, sizeof(features)/sizeof(const char*),
// TODO Add env variable to select threads
nullptr, 0);
features, MOZ_ARRAY_LENGTH(features),
threadFilters, MOZ_ARRAY_LENGTH(threadFilters));
LOG("END mozilla_sampler_init");
}