Use pthread API to retrieve stack top on non-Android Linux
Categories
(Core :: Gecko Profiler, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox152 | --- | fixed |
People
(Reporter: csmantle, Assigned: csmantle)
References
Details
Attachments
(1 external file)
Currently, we only use OS-provided facilities to retrieve the top address of the stack on Windows and Darwin kernels, and use a guessed value on Linux [^0]. Linux also provides Darwin-like functions, pthread_getattr_np(3) [^1] and pthread_attr_getstack(3) [^2] for this purpose. If we can use them, we won't have to guess on Linux.
Paul [:padenot] (CC'd below) raised a concern about the potential blockage of sched_setaffinity(2) by the sandbox [^3]. However, as Jed [:jld] (also CC'd below) pointed out, this isn't a big problem as of the current glibc v2.43, since it will simply give up setting this value [^4].
I'm not very familiar with Android, so I'm limiting the scope of this bug to non-Android Linux for now.
| Assignee | ||
Comment 1•5 months ago
|
||
Updated•5 months ago
|
Comment 2•5 months ago
|
||
(In reply to Rong Bao [:csmantle] from comment #0)
However, as Jed [:jld] (also CC'd below) pointed out, this isn't a big problem as of the current glibc v2.43
For what it's worth, I checked git blame and apparently it's been like that since affinity support was added in 2003.
Comment 4•5 months ago
|
||
| bugherder | ||
Updated•5 months ago
|
Description
•