Update LUL and EHABIStackWalk tables when libraries get loaded and unloaded. Stack unwinding doesn't work on libraries that were loaded after profiler initialization (e.g. libfreebl3.so, libsoftokn3.so)
Categories
(Core :: Gecko Profiler, defect, P2)
Tracking
()
People
(Reporter: mstange, Unassigned)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
Profile: https://perfht.ml/2UlOfWZ
I don't see stacks in libfreebl3.so and libsoftokn3.so on Android/arm.
Are we simply not setting the right build flags to include the necessary information for EHABI stack unwinding?
Reporter | ||
Comment 1•5 years ago
|
||
Reporter | ||
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
They do have exidx/extab sections. But I think the reason this happens for only those libraries, and not the rest of NSS/NSPR, is because they're dynamically loaded after the unwinder is initialized. The unwinder has its own mapping from executable code addresses to exception tables, which is read-only after it's initialized and therefore safe to use from async signal context. In principle it would be possible to implement something more complicated to allow for atomic updates of that information, but it was never a problem on B2G as far as I can recall.
Reporter | ||
Comment 4•5 years ago
|
||
Interesting!
This will also become a problem for libxul.so itself once we merge the Base Profiler and the regular profiler, because profiler initialization will happen before libxul is loaded.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 5•5 years ago
|
||
LUL has the same problem, and will also need to be fixed for the unified base profiler.
Updated•2 years ago
|
Reporter | ||
Updated•8 months ago
|
Description
•