本文整理汇总了C++中Profiler::shouldSkipBuiltins方法的典型用法代码示例。如果您正苦于以下问题:C++ Profiler::shouldSkipBuiltins方法的具体用法?C++ Profiler::shouldSkipBuiltins怎么用?C++ Profiler::shouldSkipBuiltins使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profiler
的用法示例。
在下文中一共展示了Profiler::shouldSkipBuiltins方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onFunctionExit
void EventHook::onFunctionExit(const ActRec* ar, const TypedValue* retval,
const Fault* fault, ssize_t flags) {
// Xenon
if (flags & RequestInjectionData::XenonSignalFlag) {
Xenon::getInstance().log(Xenon::ExitSample);
}
// Inlined calls normally skip the function enter and exit events. If we
// side exit in an inlined callee, we short-circuit here in order to skip
// exit events that could unbalance the call stack.
if ((jit::TCA) ar->m_savedRip == jit::mcg->tx().uniqueStubs.retInlHelper) {
return;
}
// User profiler
if (flags & RequestInjectionData::EventHookFlag) {
Profiler* profiler = ThreadInfo::s_threadInfo->m_profiler;
if (profiler != nullptr &&
!(profiler->shouldSkipBuiltins() && ar->func()->isBuiltin())) {
// NB: we don't have a function type flag to match what we got in
// onFunctionEnter. That's okay, though... we tolerate this in
// TraceProfiler.
end_profiler_frame(profiler,
retval,
GetFunctionNameForProfiler(ar->func(), NormalFunc));
}
if (shouldRunUserProfiler(ar->func())) {
if (ThreadInfo::s_threadInfo->m_pendingException != nullptr) {
// Avoid running PHP code when exception from destructor is pending.
// TODO(#2329497) will not happen once CheckSurprise is used
} else if (!fault) {
runUserProfilerOnFunctionExit(ar, retval, nullptr);
} else if (fault->m_faultType == Fault::Type::UserException) {
runUserProfilerOnFunctionExit(ar, retval, fault->m_userException);
} else {
// Avoid running PHP code when unwinding C++ exception.
}
}
}
// Debugger hook
if (flags & RequestInjectionData::DebuggerHookFlag) {
DEBUGGER_ATTACHED_ONLY(phpDebuggerFuncExitHook(ar));
}
}
示例2: onFunctionEnter
void EventHook::onFunctionEnter(const ActRec* ar, int funcType, ssize_t flags) {
// Xenon
if (flags & RequestInjectionData::XenonSignalFlag) {
Xenon::getInstance().log(Xenon::EnterSample);
}
// User profiler
if (flags & RequestInjectionData::EventHookFlag) {
if (shouldRunUserProfiler(ar->func())) {
runUserProfilerOnFunctionEnter(ar);
}
Profiler* profiler = ThreadInfo::s_threadInfo->m_profiler;
if (profiler != nullptr &&
!(profiler->shouldSkipBuiltins() && ar->func()->isBuiltin())) {
begin_profiler_frame(profiler,
GetFunctionNameForProfiler(ar->func(), funcType));
}
}
// Debugger hook
if (flags & RequestInjectionData::DebuggerHookFlag) {
DEBUGGER_ATTACHED_ONLY(phpDebuggerFuncEntryHook(ar));
}
}