Last Comment Bug 812946 - Mix C++ and JS backtraces on Linux x86/x64.
: Mix C++ and JS backtraces on Linux x86/x64.
Product: Core
Classification: Components
Component: Gecko Profiler (show other bugs)
: 19 Branch
: x86_64 Linux
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Markus Stange [:mstange]
Depends on:
Blocks: 807854
  Show dependency treegraph
Reported: 2012-11-18 18:07 PST by Nicolas B. Pierron [:nbp]
Modified: 2013-07-10 12:43 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Use stackwalking on Linux. (13.81 KB, patch)
2012-11-19 15:53 PST, Nicolas B. Pierron [:nbp]
no flags Details | Diff | Splinter Review

Description User image Nicolas B. Pierron [:nbp] 2012-11-18 18:07:12 PST
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.
Comment 1 User image Nicolas B. Pierron [:nbp] 2012-11-19 15:53:11 PST
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.
Comment 2 User image Nicolas B. Pierron [:nbp] 2013-02-22 10:33:42 PST
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 ?!
Comment 3 User image Benoit Girard (:BenWa) 2013-07-10 12:43:29 PDT
This has been fixed elsewhere.

Note You need to log in before you can comment on or make changes to this bug.