Bug 1911021 - exclude self-hosted builtins from tracing r=arai

Including these just results in a lot of unnecessary noise in profiles.

Differential Revision: https://phabricator.services.mozilla.com/D221915
This commit is contained in:
alexical 2024-10-15 18:13:40 +00:00
parent 16a2c3cd7c
commit ecd95475ac

View File

@ -183,7 +183,7 @@ bool ExecutionTracer::onEnterFrame(JSContext* cx, AbstractFramePtr frame) {
DebuggerFrameType type = GetFrameType(frame); DebuggerFrameType type = GetFrameType(frame);
if (type == DebuggerFrameType::Call) { if (type == DebuggerFrameType::Call) {
if (frame.isFunctionFrame()) { if (frame.isFunctionFrame() && !frame.callee()->isSelfHostedBuiltin()) {
inlineData_.beginWritingEntry(); inlineData_.beginWritingEntry();
inlineData_.write(uint8_t(InlineEntryType::StackFunctionEnter)); inlineData_.write(uint8_t(InlineEntryType::StackFunctionEnter));
if (!writeFunctionFrame(cx, frame)) { if (!writeFunctionFrame(cx, frame)) {
@ -201,7 +201,7 @@ bool ExecutionTracer::onLeaveFrame(JSContext* cx, AbstractFramePtr frame) {
DebuggerFrameType type = GetFrameType(frame); DebuggerFrameType type = GetFrameType(frame);
if (type == DebuggerFrameType::Call) { if (type == DebuggerFrameType::Call) {
if (frame.isFunctionFrame()) { if (frame.isFunctionFrame() && !frame.callee()->isSelfHostedBuiltin()) {
inlineData_.beginWritingEntry(); inlineData_.beginWritingEntry();
inlineData_.write(uint8_t(InlineEntryType::StackFunctionLeave)); inlineData_.write(uint8_t(InlineEntryType::StackFunctionLeave));
if (!writeFunctionFrame(cx, frame)) { if (!writeFunctionFrame(cx, frame)) {