Closed Bug 1369612 Opened 7 years ago Closed 7 years ago

Remove ProfilerStackFrameDynamicRAII and profiler_call_{enter,exit}

Categories

(Core :: Gecko Profiler, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(1 file, 1 obsolete file)

ProfilerStackFrameRAII and ProfilerStackFrameDynamicRAII are very similar; the
latter lets a dynamic string be specified as well (and lacks the
MOZ_GUARD_OBJECT stuff, for no good reason).

This patch does the following.

- Removes ProfilerStackFrameDynamicRAII, and adds a dynamic string to
  ProfilerStackFrameRAII. It also reorders the constructor's arguments to match
  the field ordering of ProfileEntry. There aren't many usage sites so these
  changes don't affect many places.

- With that done, there is only a single callsite for each of
  profiler_call_enter() and profiler_call_exit(), so the patch also inlines and
  removes them.
ProfilerStackFrameRAII and ProfilerStackFrameDynamicRAII are very similar; the
latter lets a dynamic string be specified as well (and lacks the
MOZ_GUARD_OBJECT stuff, for no good reason).

This patch does the following.

- Removes ProfilerStackFrameDynamicRAII, and adds a dynamic string to
  ProfilerStackFrameRAII. It also reorders the constructor's arguments to match
  the field ordering of ProfileEntry. There aren't many usage sites so these
  changes don't affect many places.

- With that done, there is only a single callsite for each of
  profiler_call_enter() and profiler_call_exit(), so the patch also inlines and
  removes them.
Attachment #8873708 - Flags: review?(mstange)
Attachment #8873696 - Attachment is obsolete: true
Attachment #8873696 - Flags: review?(mstange)
Comment on attachment 8873708 [details] [diff] [review]
Remove ProfilerStackFrameDynamicRAII and profiler_call_{enter,exit}

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

::: tools/profiler/public/GeckoProfiler.h
@@ +500,5 @@
>  private:
> +  MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
> +  // We save a PseudoStack pointer in the ctor so we don't have to redo the TLS
> +  // lookup in the dtor.
> +  PseudoStack* mPseudoStack;

Thanks for giving this the right type.
Attachment #8873708 - Flags: review?(mstange) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/e3cf285f484a04e665f1f42d9df50de0c65dc1ea
Bug 1369612 - Remove ProfilerStackFrameDynamicRAII and profiler_call_{enter,exit}. r=mstange.
https://hg.mozilla.org/mozilla-central/rev/e3cf285f484a
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: