本文整理汇总了C++中PseudoStack::disableJSSampling方法的典型用法代码示例。如果您正苦于以下问题:C++ PseudoStack::disableJSSampling方法的具体用法?C++ PseudoStack::disableJSSampling怎么用?C++ PseudoStack::disableJSSampling使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PseudoStack
的用法示例。
在下文中一共展示了PseudoStack::disableJSSampling方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mozilla_sampler_stop
void mozilla_sampler_stop()
{
if (!stack_key_initialized)
profiler_init();
TableTicker *t = tlsTicker.get();
if (!t) {
return;
}
bool disableJS = t->ProfileJS();
t->Stop();
delete t;
tlsTicker.set(NULL);
PseudoStack *stack = tlsPseudoStack.get();
ASSERT(stack != NULL);
if (disableJS)
stack->disableJSSampling();
sIsProfiling = false;
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
if (os)
os->NotifyObservers(nullptr, "profiler-stopped", nullptr);
}
示例2: mozilla_sampler_stop
void mozilla_sampler_stop()
{
LOG("BEGIN mozilla_sampler_stop");
if (!stack_key_initialized)
profiler_init(nullptr);
TableTicker *t = tlsTicker.get();
if (!t) {
LOG("END mozilla_sampler_stop-early");
return;
}
bool disableJS = t->ProfileJS();
bool unwinderThreader = t->HasUnwinderThread();
// Shut down and reap the unwinder thread. We have to do this
// before stopping the sampler, so as to guarantee that the unwinder
// thread doesn't try to access memory that the subsequent call to
// mozilla_sampler_stop causes to be freed.
if (unwinderThreader) {
uwt__stop();
}
t->Stop();
delete t;
tlsTicker.set(nullptr);
if (disableJS) {
PseudoStack *stack = tlsPseudoStack.get();
ASSERT(stack != nullptr);
stack->disableJSSampling();
}
if (unwinderThreader) {
uwt__deinit();
}
mozilla::IOInterposer::Unregister(mozilla::IOInterposeObserver::OpAll,
sInterposeObserver);
sInterposeObserver = nullptr;
sIsProfiling = false;
if (Sampler::CanNotifyObservers()) {
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
if (os)
os->NotifyObservers(nullptr, "profiler-stopped", nullptr);
}
LOG("END mozilla_sampler_stop");
}
示例3: mozilla_sampler_stop
void mozilla_sampler_stop()
{
LOG("BEGIN mozilla_sampler_stop");
if (!stack_key_initialized)
return;
GeckoSampler *t = tlsTicker.get();
if (!t) {
LOG("END mozilla_sampler_stop-early");
return;
}
bool disableJS = t->ProfileJS();
t->Stop();
delete t;
tlsTicker.set(nullptr);
#ifndef SPS_STANDALONE
if (disableJS) {
PseudoStack *stack = tlsPseudoStack.get();
ASSERT(stack != nullptr);
stack->disableJSSampling();
}
mozilla::IOInterposer::Unregister(mozilla::IOInterposeObserver::OpAll,
sInterposeObserver);
sInterposeObserver = nullptr;
#endif
sIsProfiling = false;
#ifndef SPS_STANDALONE
sIsGPUProfiling = false;
sIsLayersDump = false;
sIsDisplayListDump = false;
sIsRestyleProfiling = false;
if (Sampler::CanNotifyObservers()) {
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
if (os)
os->NotifyObservers(nullptr, "profiler-stopped", nullptr);
}
#endif
LOG("END mozilla_sampler_stop");
}