Closed Bug 856331 Opened 12 years ago Closed 12 years ago

Make breakpad unwinding runtime switchable

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: BenWa, Assigned: BenWa)

References

Details

Attachments

(1 file, 4 obsolete files)

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.
Attached patch patch (obsolete) — Splinter Review
With this patch and some changes to the extension we can now toggle the use of the unwinder thread from the extension.
Assignee: nobody → bgirard
Status: NEW → ASSIGNED
Attachment #731998 - Flags: review?(jseward)
Attached patch patch rebased (obsolete) — Splinter Review
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)
Blocks: 863453
Attached patch patch rebased (obsolete) — Splinter Review
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)
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+
> 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.
Attached patch patch v2 (obsolete) — Splinter Review
MOZ_PROFILER_NEW no longer regresses, fixed comments.
Attachment #739296 - Attachment is obsolete: true
Attachment #739661 - Flags: review+
Attached patch patch v3Splinter Review
Fixed a bug with restarting breakpad unwinding. I now reset exit_now.
Attachment #739661 - Attachment is obsolete: true
Attachment #739737 - Flags: review+
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.

Attachment

General

Created:
Updated:
Size: