Closed Bug 718025 Opened 13 years ago Closed 12 years ago

Add support for stacktraces on Windows to the built-in profiler

Categories

(Core :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file, 2 obsolete files)

I have a patch which enables us to walk the stack on Windows.  The symbolication part is missing, so it's not quite useful yet, but stepping through the code, things seem to be working fine.
Attached patch Patch (v1) (obsolete) — Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #588491 - Flags: review?(jmuizelaar)
Comment on attachment 588491 [details] [diff] [review]
Patch (v1)

Review of attachment 588491 [details] [diff] [review]:
-----------------------------------------------------------------

::: tools/profiler/sps/TableTicker.cpp
@@ +361,5 @@
>  }
>  #endif
>  
> +#ifdef USE_NS_STACKWALK
> +typedef nsTArray<void*> PCArray;

I don't think you can safely use an nsTArray when a thread is paused.
nsTArray will do mallocs which will deadlock if the stopped thread is inside malloc.

::: tools/profiler/sps/platform.h
@@ +204,5 @@
>    PlatformData* platform_data() { return data_; }
>  
> +#ifdef XP_WIN
> +  // xxxehsan sucky hack :(
> +  static uintptr_t GetThreadHandle(PlatformData*);

gross
Attachment #588491 - Flags: review?(jmuizelaar) → review-
Attached patch Patch (v2) (obsolete) — Splinter Review
Good catch.  I wonder why I didn't get hangs while testing. :/
Attachment #588491 - Attachment is obsolete: true
Attachment #588984 - Flags: review?(jmuizelaar)
Attachment #588984 - Flags: review?(jmuizelaar) → review+
Backed you out in https://hg.mozilla.org/integration/mozilla-inbound/rev/e40e72d6264d since I was pretty sure you'd rather have Windows continue to build ;)
Ouch...  Some day I will learn how to program.  Until that day comes, here's a link to the log for reference: https://tbpl.mozilla.org/php/getParsedLog.php?id=8595118&tree=Mozilla-Inbound
Attachment #588984 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/419f8a0f6374
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: