A few more small profiler improvements

RESOLVED FIXED in Firefox 54

Status

()

Core
Gecko Profiler
RESOLVED FIXED
7 months ago
6 months ago

People

(Reporter: njn, Assigned: njn)

Tracking

unspecified
mozilla54
Points:
---

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(3 attachments)

(Assignee)

Description

7 months ago
Here's a motley collection of small improvements.
(Assignee)

Updated

7 months ago
Component: Profiler → Gecko Profiler
Product: Tamarin → Core
(Assignee)

Updated

7 months ago
Blocks: 1328363
(Assignee)

Comment 1

7 months ago
Created attachment 8833167 [details] [diff] [review]
(part 1) - Remove Sampler::GetRegisteredThreads()

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)

Updated

7 months ago
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
(Assignee)

Comment 2

7 months ago
Created attachment 8833168 [details] [diff] [review]
(part 2) - Make sRegisteredThreadsMutex a StaticMutex

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)
(Assignee)

Comment 3

7 months ago
Created attachment 8833169 [details] [diff] [review]
(part 3) - Remove SamplerRegistry

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+
(Assignee)

Comment 4

6 months ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/dfcd7fa37af1a07dbe2d221735bcb192ad4c43e7
Bug 1336326 (part 1) - Remove Sampler::GetRegisteredThreads(). r=mstange.

https://hg.mozilla.org/integration/mozilla-inbound/rev/32550b42266999359049ab671fce22fdb5dc4f7b
Bug 1336326 (part 2) - Make sRegisteredThreadsMutex a StaticMutex. r=mstange.

https://hg.mozilla.org/integration/mozilla-inbound/rev/65c5923d0feccdbe87b3dfc50a389e715d775a70
Bug 1336326 (part 3) - Remove SamplerRegistry. r=mstange.

Comment 5

6 months ago
bugherder
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
Last Resolved: 6 months ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.