Mix C++ and JS backtraces on Linux x86/x64.

RESOLVED WORKSFORME

Status

()

Core
Gecko Profiler
RESOLVED WORKSFORME
5 years ago
4 years ago

People

(Reporter: nbp, Unassigned)

Tracking

(Blocks: 1 bug)

19 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
The current implementation of the gecko profiler does not support mixing backtraces for C++ and JS in a profile.  The current implementation iterate on the C++ stack with the backtrace function which does not provide the frame pointer of each frame.

Mac implementation is using pthread_get_stackaddr_np, which can be translated with pthread_getattr_np on Linux.

This bug is a short-term fix as breakpad is supposed to replace this stack walking implementation in a long-term.
(Reporter)

Comment 1

5 years ago
Created attachment 683348 [details] [diff] [review]
Use stackwalking on Linux.

This is not urgent, not tested on tbpl, and is unlikely to fit all expectation.

This is just a not-so dirty version of my hacky patch to mix the C++ stack with the JS stack.  When testing with a browser or a few shell benchmarks, I saw a few hangs which might be related to Bug 757186.  In the mean time I provide this patch because it is still useful for profiling in the xpcshell no matters if there is a hang or not.
(Reporter)

Comment 2

5 years ago
Unassigned my-self: I am not actively work on it.
And it seems to work, so maybe mark this bug as a duplicate of something else ?!
Assignee: nicolas.b.pierron → nobody
Status: ASSIGNED → NEW
This has been fixed elsewhere.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.