本文整理汇总了C++中ProfileGenerator::stoppedProfiling方法的典型用法代码示例。如果您正苦于以下问题:C++ ProfileGenerator::stoppedProfiling方法的具体用法?C++ ProfileGenerator::stoppedProfiling怎么用?C++ ProfileGenerator::stoppedProfiling使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProfileGenerator
的用法示例。
在下文中一共展示了ProfileGenerator::stoppedProfiling方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: stopProfiling
void Profiler::stopProfiling(ExecState* exec, const UString& title)
{
ExecState* globalExec = exec->lexicalGlobalObject()->globalExec();
for (ptrdiff_t i = m_currentProfiles.size() - 1; i >= 0; --i) {
ProfileGenerator* profileGenerator = m_currentProfiles[i].get();
if (!profileGenerator->stoppedProfiling() && profileGenerator->originatingGlobalExec() == globalExec && (title.isNull() || profileGenerator->title() == title))
m_currentProfiles[i]->stopProfiling();
}
}
示例2: startProfiling
void Profiler::startProfiling(ExecState* exec, const UString& title, ProfilerClient* client)
{
ASSERT_ARG(exec, exec);
// Check if we currently have a Profile for this global ExecState and title.
// If so return early and don't create a new Profile.
ExecState* globalExec = exec->lexicalGlobalObject()->globalExec();
for (size_t i = 0; i < m_currentProfiles.size(); ++i) {
ProfileGenerator* profileGenerator = m_currentProfiles[i].get();
if (!profileGenerator->stoppedProfiling() && profileGenerator->originatingGlobalExec() == globalExec && profileGenerator->title() == title)
return;
}
s_sharedEnabledProfilerReference = this;
RefPtr<ProfileGenerator> profileGenerator = ProfileGenerator::create(title, globalExec, exec->lexicalGlobalObject()->profileGroup(), client);
m_currentProfiles.append(profileGenerator);
}