Closed Bug 1336326 Opened 7 years ago Closed 7 years ago

A few more small profiler improvements

Categories

(Core :: Gecko Profiler, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(3 files)

Here's a motley collection of small improvements.
Component: Profiler → Gecko Profiler
Product: Tamarin → Core
Sampler::sRegisteredThreadsMutex is public. Might as well make
Sampler::sRegisteredThreads public too. This allows the getter to be removed,
and makes the code a little easier to read.
Attachment #8833167 - Flags: review?(mstange)
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
StaticMutexes don't need to be created or destroyed, which avoids the need for
checking if they still exist.

This patch also adds locking to a few functions that lacked it. Every access to
sRegisteredThreads is now protected appropriately.
Attachment #8833168 - Flags: review?(mstange)
We only have one global Sampler, gSampler, and so SamplerRegistry is just an
unnecessary and obfuscating wrapper around it.
Attachment #8833169 - Flags: review?(mstange)
Attachment #8833167 - Flags: review?(mstange) → review+
Attachment #8833168 - Flags: review?(mstange) → review+
Attachment #8833169 - Flags: review?(mstange) → review+
https://hg.mozilla.org/mozilla-central/rev/dfcd7fa37af1
https://hg.mozilla.org/mozilla-central/rev/32550b422669
https://hg.mozilla.org/mozilla-central/rev/65c5923d0fec
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: