Closed
Bug 1333655
Opened 4 years ago
Closed 4 years ago
Improve the profiler's Thread class
Categories
(Core :: Gecko Profiler, defect)
Core
Gecko Profiler
Tracking
()
RESOLVED
FIXED
mozilla54
| Tracking | Status | |
|---|---|---|
| firefox54 | --- | fixed |
People
(Reporter: njn, Assigned: njn)
References
Details
Attachments
(1 file, 1 obsolete file)
|
17.28 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
It's a clumsy cross-platform abstraction. GetCurrentId() and tid_t are the only genuinely cross-platform things in it, and the patch keeps those in place. The remaining methods are not implemented on all platforms (none are implemented on Linux) and the fields are all used on either Mac or Windows, but not both. So the patch introduces MacOSThread and Win32Thread classes and moves the relevant Thread method implementations and fields into them. There is sufficiently little overlap between the two new classes that there is no point sharing a base class between them. The patch also changes some of the existing code to use Gecko style, e.g. |mFoo| instead of |foo_| for class fields.
| Assignee | ||
Comment 1•4 years ago
|
||
Attachment #8830125 -
Flags: review?(mstange)
Comment 2•4 years ago
|
||
Comment on attachment 8830125 [details] [diff] [review] Improve the profiler's Thread class Review of attachment 8830125 [details] [diff] [review]: ----------------------------------------------------------------- Ok. Without the standalone build requirement, there's not much reason not to use PR_CreateThread and friends, is there?
Attachment #8830125 -
Flags: review?(mstange) → review+
| Assignee | ||
Comment 3•4 years ago
|
||
Sorry that I'm asking for re-review, but I realized that Win32Thread and MacOSThread both had a single sub-class (two different versions of SamplerThread) and that this sub-classing is unnecessary. Removing it gets rid of some virtual methods and simplifies thread naming on Mac.
Attachment #8831001 -
Flags: review?(mstange)
| Assignee | ||
Updated•4 years ago
|
Attachment #8830125 -
Attachment is obsolete: true
Updated•4 years ago
|
Attachment #8831001 -
Flags: review?(mstange) → review+
| Assignee | ||
Comment 4•4 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/31af743f4a0273ad198f50fe8d20dd6978027979 Bug 1333655 - Improve the profiler's Thread class. r=mstange.
Comment 5•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/31af743f4a02
Status: ASSIGNED → RESOLVED
Closed: 4 years 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.
Description
•