Closed Bug 724079 Opened 12 years ago Closed 12 years ago

Use the mac profiler backend again

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Details

Attachments

(2 files, 5 obsolete files)

I'm hoping this will fix up the crash problems we've been seeing.
Attached patch Add an internal stackwalk API (obsolete) — Splinter Review
This will be used by the profiler to be able to unwind arbitrary threads.
Attachment #594277 - Flags: review?(ehsan)
Attached patch Bring the mac backend back (obsolete) — Splinter Review
Attachment #594278 - Flags: review?(ehsan)
Attached file Add an internal stackwalk API v2 (obsolete) —
Attachment #594277 - Attachment is obsolete: true
Attachment #594277 - Flags: review?(ehsan)
Attachment #594279 - Flags: review?(ehsan)
Attached patch Add an internal stackwalk API v3 (obsolete) — Splinter Review
Attachment #594279 - Attachment is obsolete: true
Attachment #594279 - Flags: review?(ehsan)
Attachment #594468 - Flags: review?(ehsan)
Attached patch Bring the mac backend back v2 (obsolete) — Splinter Review
This patches actually work now.
Attachment #594278 - Attachment is obsolete: true
Attachment #594278 - Flags: review?(ehsan)
Attachment #594469 - Flags: review?(ehsan)
(In reply to Jeff Muizelaar [:jrmuizel] from comment #5)
> Created attachment 594469 [details] [diff] [review]
> Bring the mac backend back v2
> 
> This patches actually work now.

I had an unrefreshed change to make this use sample->fp instead of pc
Comment on attachment 594468 [details] [diff] [review]
Add an internal stackwalk API v3

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

::: xpcom/base/StackWalk.h
@@ +12,5 @@
> + * for the specific language governing rights and limitations under the
> + * License.
> + *
> + * The Initial Developer of the Original Code is the Mozilla Foundation.
> + * Portions created by the Initial Developer are Copyright (C) 2011

2012!

::: xpcom/base/nsStackWalk.cpp
@@ +1573,4 @@
>  
>  #else // not __sun-specific
>  
> +#if (defined(__i386) || defined(__ppc__) || defined(PPC) || defined(__amd64)) && defined(__GNUC__)

Please move the X86_OR_PPC definition back up here and change this to use that macro.
Attachment #594468 - Flags: review?(ehsan) → review+
Comment on attachment 594469 [details] [diff] [review]
Bring the mac backend back v2

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

::: tools/profiler/sps/TableTicker.cpp
@@ +497,4 @@
>    }
>  }
>  #endif
> +*/

This function will still be used on Linux right?  Not sure why you're removing it.  I'm pretty sure this breaks Linux builds!

@@ +501,2 @@
>  
> +//#ifdef USE_NS_STACKWALK

This will also break Linux!

@@ +529,5 @@
>      mozilla::ArrayLength(pc_array),
>      0
>    };
> +#ifdef XP_MACOSX
> +  nsresult rv = FramePointerStackWalk(StackWalkCallback, 1, &array, reinterpret_cast<void**>(pc));

How is the size of this buffer communicated to FramePointerStackWalk?  As far as I can tell, we're just hoping that we won't be more than 1000 frames deep in the stack, right?

@@ +542,4 @@
>      }
>    }
>  }
> +//#endif

See above.
Attachment #594469 - Flags: review?(ehsan) → review-
Address review comments
Attachment #594469 - Attachment is obsolete: true
Attachment #596052 - Flags: review?(ehsan)
Attachment #594468 - Attachment is obsolete: true
Attachment #596053 - Flags: review?(ehsan)
Attachment #596053 - Flags: review?(ehsan) → review+
Attachment #596052 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/c5574e55a558
https://hg.mozilla.org/mozilla-central/rev/deb7adeda4eb
Assignee: nobody → jmuizelaar
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: