Closed
Bug 856331
Opened 12 years ago
Closed 12 years ago
Make breakpad unwinding runtime switchable
Categories
(Core :: Gecko Profiler, defect)
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: BenWa, Assigned: BenWa)
References
Details
Attachments
(1 file, 4 obsolete files)
|
15.91 KB,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
With the refactoring switching between breakpad and NS_Stackwalk unwind is relatively easily. We just need to add a 'feature' and move some code from init/shutdown to start/stop.
| Assignee | ||
Comment 1•12 years ago
|
||
With this patch and some changes to the extension we can now toggle the use of the unwinder thread from the extension.
| Assignee | ||
Comment 2•12 years ago
|
||
| Assignee | ||
Comment 3•12 years ago
|
||
This patch is required to start/stop the profiler. Otherwise it crashes.
Attachment #731998 -
Attachment is obsolete: true
Attachment #731998 -
Flags: review?(jseward)
Attachment #739228 -
Flags: review?(jseward)
| Assignee | ||
Comment 4•12 years ago
|
||
| Assignee | ||
Comment 5•12 years ago
|
||
I had to rebase this on top multi-threaded profile since it will be merged tomorrow.
Attachment #739228 -
Attachment is obsolete: true
Attachment #739228 -
Flags: review?(jseward)
Attachment #739296 -
Flags: review?(jseward)
| Assignee | ||
Comment 6•12 years ago
|
||
Comment 7•12 years ago
|
||
Comment on attachment 739296 [details] [diff] [review]
patch rebased
Review of attachment 739296 [details] [diff] [review]:
-----------------------------------------------------------------
r+ provided the two mentioned issues are fixed.
::: tools/profiler/UnwinderThread2.cpp
@@ +1538,5 @@
> }
> +
> + g_stackLimitsUsed = 0;
> + g_seqNo = 0;
> + free(g_buffers);
I would prefer if we didn't free g_buffers at this point. There may
be a race with the sampling threads which could potentially cause them
to segfault. There's a comment about this in UnwinderThread2.cpp,
starting with "These calloc-ations are never freed ..."
I think a safer approach, when the multithreading profiling support
has settled down, is to have a separate bug to assess thread safety
(via Helgrind) and memory leakyness of the profiler back end, and fix
up any races and leaks that we can find.
::: tools/profiler/platform.cpp
@@ +267,5 @@
> tlsPseudoStack.set(stack);
>
> Sampler::RegisterCurrentThread("Gecko", stack, true);
>
> + sps_version2();
I didn't understand this .. did you intend to call it? It
returns a bool which this call now ignores.
Attachment #739296 -
Flags: review?(jseward) → review+
Comment 8•12 years ago
|
||
> I would prefer if we didn't free g_buffers at this point.
I meant to add, "nor null it out.", but remembered too late.
| Assignee | ||
Comment 9•12 years ago
|
||
MOZ_PROFILER_NEW no longer regresses, fixed comments.
Attachment #739296 -
Attachment is obsolete: true
Attachment #739661 -
Flags: review+
| Assignee | ||
Comment 10•12 years ago
|
||
Fixed a bug with restarting breakpad unwinding. I now reset exit_now.
Attachment #739661 -
Attachment is obsolete: true
Attachment #739737 -
Flags: review+
| Assignee | ||
Comment 11•12 years ago
|
||
Comment 12•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in
before you can comment on or make changes to this bug.
Description
•