Open Bug 1705258 Opened 4 years ago Updated 4 years ago

Skip stack-walking and profiler frames until profiler_capture_backtrace_into

Categories

(Core :: Gecko Profiler, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mozbugz, Unassigned)

References

Details

profiler_capture_backtrace_into should use CallerPC() to skip itself and leaf profiler&walker frames.

Also:
Bug 1515229 made skipping leaf frames from reliable, but MozStackWalkThread doesn't skip anything because it's assumed that it targets another thread. However the profiler uses it to also walk the current thread, through the public API profiler_capture_backtrace_into.
So we'll need to do something to skip profiler and stack-walking frames in this case.
Options I can think of:

  • DoNativeBacktrace could call MozStackWalk (not ...Thread) when dealing with the current thread.
  • MozStackWalkThread could be changed to accept an optional aFirstFramePC, like MozStackWalk.
You need to log in before you can comment on or make changes to this bug.