Using RAII object for profiler_tracing calls while possible

RESOLVED WORKSFORME

Status

()

Core
Gecko Profiler
RESOLVED WORKSFORME
3 years ago
a year ago

People

(Reporter: chiajung, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
Currently we call profiler_tracing in with START and END manually in many place. While START & END must be paired, if the function have several return clause, we will have to insert a END for each.

This is error prone and sometimes hard to read. We should replace them with the RAII onject provided in bug 1123249 for profiler_tracing.
I think this is going to be addressed tangentially in bug 1322553.
(In reply to Nathan Froyd [:froydnj] from comment #1)
> I think this is going to be addressed tangentially in bug 1322553.

Indeed, there is only one remaining pair of interval profiler_tracing() calls. The START event is in gfx/layers/client/ClientLayerManager.cpp and the END event is in gfx/layers/ipc/ShadowLayers.cpp, so it can't use the RAII type. So there's nothing more to be done.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.