Closed Bug 1707692 Opened 4 years ago Closed 4 years ago

Annotate XPIDL method/getter/setter calls with profiler labels for the IDL method name (NS_InvokeByIndex, XPCWrappedNative, CallMethodHelper)

Categories

(Core :: XPConnect, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: mstange, Assigned: florian)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Example profile: https://share.firefox.dev/3vg3Wj2

When JS calls C++ code via an XPIDL method, we inherit the JavaScript profiler category into the C++ part of the stack.

It would be great if we could display the interface + method name of the called code and switch to the DOM category, like we do for WebIDL APIs.

In the example profile, this would be the call to GfxInfoBase::GetContentBackend, which is accessed through get nsIGfxInfo.ContentBackend.

Profile with patch: https://share.firefox.dev/2S4zsCy

Todo:

  • Write a test.
  • Maybe add a comment or two.
  • Figure out if anything needs to be done to handle symbols, or if <symbol> is an acceptable fallback.

One useful comment to add to the code would be that the goal is to match WebIDL profiler labels, which also use the DOM category.

Assignee: nobody → florian
Status: NEW → ASSIGNED
Attachment #9218455 - Attachment is obsolete: true
Pushed by fqueze@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/395537045072 Annotate XPIDL method/getter/setter calls with profiler labels for the IDL method name, original patch by mstange. r=nika
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: