mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 09:30:44 +00:00
Bug 1496623 - Rename and comment GeckoProfilerThread::installed() r=njn
--HG-- extra : rebase_source : 2478d8e26f702c9bdbd933a18e36df5232353dc8 extra : histedit_source : 95df9357a34d2c3b1a96856d2df0f63de407e4cc
This commit is contained in:
parent
2a3a5dac4b
commit
6485ea0dfe
@ -474,12 +474,16 @@ class GeckoProfilerThread
|
||||
public:
|
||||
GeckoProfilerThread();
|
||||
|
||||
uint32_t stackPointer() { MOZ_ASSERT(installed()); return profilingStack_->stackPointer; }
|
||||
uint32_t stackPointer() { MOZ_ASSERT(infraInstalled()); return profilingStack_->stackPointer; }
|
||||
ProfilingStackFrame* stack() { return profilingStack_->frames; }
|
||||
ProfilingStack* getProfilingStack() { return profilingStack_; }
|
||||
|
||||
/* management of whether instrumentation is on or off */
|
||||
bool installed() { return profilingStack_ != nullptr; }
|
||||
/*
|
||||
* True if the profiler infrastructure is setup. Should be true in builds
|
||||
* that include profiler support except during early startup or late
|
||||
* shutdown. Unrelated to the presence of the Gecko Profiler addon.
|
||||
*/
|
||||
bool infraInstalled() { return profilingStack_ != nullptr; }
|
||||
|
||||
void setProfilingStack(ProfilingStack* profilingStack);
|
||||
void trace(JSTracer* trc);
|
||||
|
@ -3820,7 +3820,7 @@ EvalInContext(JSContext* cx, unsigned argc, Value* vp)
|
||||
static bool
|
||||
EnsureGeckoProfilingStackInstalled(JSContext* cx, ShellContext* sc)
|
||||
{
|
||||
if (cx->geckoProfiler().installed()) {
|
||||
if (cx->geckoProfiler().infraInstalled()) {
|
||||
MOZ_ASSERT(sc->geckoProfilingStack);
|
||||
return true;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ GeckoProfilerEntryMarker::GeckoProfilerEntryMarker(JSContext* cx,
|
||||
: profiler_(&cx->geckoProfiler())
|
||||
{
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
if (MOZ_LIKELY(!profiler_->installed())) {
|
||||
if (MOZ_LIKELY(!profiler_->infraInstalled())) {
|
||||
profiler_ = nullptr;
|
||||
return;
|
||||
}
|
||||
@ -88,7 +88,7 @@ AutoGeckoProfilerEntry::AutoGeckoProfilerEntry(JSContext* cx, const char* label,
|
||||
: profiler_(&cx->geckoProfiler())
|
||||
{
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
if (MOZ_LIKELY(!profiler_->installed())) {
|
||||
if (MOZ_LIKELY(!profiler_->infraInstalled())) {
|
||||
profiler_ = nullptr;
|
||||
return;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ void
|
||||
GeckoProfilerRuntime::enable(bool enabled)
|
||||
{
|
||||
JSContext* cx = rt->mainContextFromAnyThread();
|
||||
MOZ_ASSERT(cx->geckoProfiler().installed());
|
||||
MOZ_ASSERT(cx->geckoProfiler().infraInstalled());
|
||||
|
||||
if (enabled_ == enabled) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user