Closed
Bug 1326221
Opened 9 years ago
Closed 4 years ago
Use AutoProfilerRegister in more places
Categories
(Core :: Gecko Profiler, task)
Core
Gecko Profiler
Tracking
()
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox53 | --- | affected |
People
(Reporter: mstange, Unassigned)
Details
The patches in bug 1323100 add a class called AutoProfilerRegister which calls profiler_register_thread and profiler_unregister_thread in its constructor and destructor.
It uses the address of the AutoProfilerRegister object as the thread's stack base pointer. Consequently, it requires itself to be the first variable that is put on the stack in the given thread.
After bug 1323100, there are a few remaining direct calls to profiler_register_thread, in places where the AutoProfilerRegister object would not have been the first stack variable. We can add an optional stack base pointer argument to the AutoProfilerRegister constructor so that we can use AutoProfilerRegister in those places, too.
There are very few places left still using profiler_register_thread, and I doubt these could be changed, so I'd consider that part done.
In which case the option to provide a stack pointer to AutoProfilerRegister (aka AUTO_PROFILER_REGISTER_THREAD now) is not really needed anymore. It could easily be added if there's a new need for it...
So I'll make this bug fixed.
Status: NEW → RESOLVED
Type: defect → task
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•