Remove ProfilerStackFrameDynamicRAII and profiler_call_{enter,exit}

RESOLVED FIXED in Firefox 55

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

2 years ago
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.
(Assignee)

Comment 2

2 years ago
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)
(Assignee)

Updated

2 years ago
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+
(Assignee)

Comment 4

2 years ago
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
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.