Closed
Bug 1431179
Opened 7 years ago
Closed 7 years ago
Remove the limit of "exit profiles" that we hold on to
Categories
(Core :: Gecko Profiler, enhancement)
Core
Gecko Profiler
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
When a content process shuts down during profiling, we grab a profile from it and put into a list of "exit profiles". If somebody later grabs a profile on the parent process, those exit profiles are included among the subprocess profiles.
The list of exit profiles is currently limited to a length of 5. We should remove that limit. But we should also make sure we discard old profiles as the leave the time range that's currently in the buffer for the parent process.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8943378 -
Flags: review?(mconley) → review?(nika)
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8943378 [details]
Bug 1431179 - Add profiler_get_buffer_start_time.
https://reviewboard.mozilla.org/r/213704/#review219480
::: tools/profiler/core/platform.cpp:2634
(Diff revision 1)
> + Maybe<double> firstSampleTime =
> + ActivePS::Buffer(lock).GetTimeOfFirstSampleInBuffer();
> +
> + if (firstSampleTime) {
> + return CorePS::ProcessStartTime() +
> + TimeDuration::FromMilliseconds(*firstSampleTime);
> + }
TIL about Maybe<T>. Very nice!
Attachment #8943378 -
Flags: review+
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8943378 [details]
Bug 1431179 - Add profiler_get_buffer_start_time.
https://reviewboard.mozilla.org/r/213704/#review219486
lgtm
Attachment #8943378 -
Flags: review?(nika) → review+
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8943379 [details]
Bug 1431179 - Keep all exit profiles that overlap with the parent process's buffer time range.
https://reviewboard.mozilla.org/r/213706/#review219488
Looks good! Thanks!
Attachment #8943379 -
Flags: review?(mconley) → review+
Assignee | ||
Comment 6•7 years ago
|
||
I've thought about this again and have come to the conclusion that I could achieve the same behavior without any TimeStamps, by looking at the buffer's read and write pos and its generation instead. I'll try that out tomorrow.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8943378 -
Attachment is obsolete: true
Assignee | ||
Comment 10•7 years ago
|
||
The new patches that I've attached here depend on the work in bug 1348959.
Depends on: 1348959
Comment 11•7 years ago
|
||
mozreview-review |
Comment on attachment 8945922 [details]
Bug 1431179 - When storing an exit profile, remember the current write position of the parent process's profiler buffer, instead of a TimeStamp.
https://reviewboard.mozilla.org/r/216004/#review222110
::: tools/profiler/gecko/nsProfiler.cpp:553
(Diff revision 1)
> void
> nsProfiler::ReceiveShutdownProfile(const nsCString& aProfile)
> {
> MOZ_RELEASE_ASSERT(NS_IsMainThread());
>
> - if (!profiler_is_active()) {
> + Maybe<ProfilerBufferInfo> bufferInfo = profiler_get_buffer_info();
Ah, now I see why you made that method return a `Maybe<T>` ^.^ - scratch that earlier comment.
Attachment #8945922 -
Flags: review?(nika) → review+
Comment 12•7 years ago
|
||
mozreview-review |
Comment on attachment 8945923 [details]
Bug 1431179 - Remove the API to obtain the time of the first sample during profile streaming.
https://reviewboard.mozilla.org/r/216006/#review222112
Yay deleting code~
Attachment #8945923 -
Flags: review?(nika) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 19•7 years ago
|
||
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/255a28ff7195
When storing an exit profile, remember the current write position of the parent process's profiler buffer, instead of a TimeStamp. r=mystor
https://hg.mozilla.org/integration/autoland/rev/ec0b493bf1bf
Remove the API to obtain the time of the first sample during profile streaming. r=mystor
https://hg.mozilla.org/integration/autoland/rev/8e6d2f2f7f30
Keep all exit profiles that overlap with the parent process's buffer time range. r=mconley
Comment 20•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/255a28ff7195
https://hg.mozilla.org/mozilla-central/rev/ec0b493bf1bf
https://hg.mozilla.org/mozilla-central/rev/8e6d2f2f7f30
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•7 years ago
|
status-firefox59:
affected → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•