Closed Bug 1847909 Opened 9 months ago Closed 8 months ago

MarkerTiming options without specifying an explicit time should not call Timestamp::Now directly

Categories

(Core :: Gecko Profiler, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1848130

People

(Reporter: julienw, Unassigned)

References

Details

(Whiteboard: [fxp] [sp3])

See the patch and discussion at https://phabricator.services.mozilla.com/D185008 and bug 1843534.

In MarkerTiming constructors (https://searchfox.org/mozilla-central/rev/dc8348b3730c0d29dafd01c653d9151eaa9bc30f/mozglue/baseprofiler/public/BaseProfilerMarkersPrerequisites.h#309-341) we call Timestamp::Now by default if there's no specified time. Instead we should defer calling it to eg https://searchfox.org/mozilla-central/rev/dc8348b3730c0d29dafd01c653d9151eaa9bc30f/mozglue/baseprofiler/public/BaseProfilerMarkersDetail.h#287-290, after the if profiler is running check that profiler_add_marker does.

One possible architecture is that MarterTiming could have a Resolve method that would be called there. This method would do the delayed operation if necessary.

This would be a good performance improvement and would affect sp3, therefore I'm marking this bug as such.

The severity field is not set for this bug.
:canova, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(canaltinova)
Severity: -- → S3
Flags: needinfo?(canaltinova)
Priority: -- → P3

Emilio's patch in bug 1848130 is good enough.

Status: NEW → RESOLVED
Closed: 8 months ago
Duplicate of bug: 1848130
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.