Add profiler markers for MSCOM IPC
Categories
(Core :: IPC: MSCOM, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: bugzilla, Assigned: bugzilla)
References
Details
Attachments
(1 file)
I've noticed code being added to our Windows builds that perform synchronous COM calls on the main thread of the browser process. Since synchronous IPC is banned, we should be showing that in the profiler.
Part of the issue here is probably that CLSCTX_LOCAL_SERVER
is not a clear indicator that the server is going to be out of process, so developers go ahead and CoCreateInstance
without considering the implications.
The way we can do this is to call CoRegisterChannelHook
, which tells the COM runtime to call our provided interface every time there is a send and receive.
Assignee | ||
Comment 1•4 years ago
|
||
Adding Jamie for the COM bits, Gerald to take a look at the markers.
To intercept COM IPC, we provide an IChannelHook
interface to
CoRegisterChannelHook
, which gives us notifications about COM IPC that we can
use to insert profiler markers. Note that IChannelHook
is not documented on
MSDN, however it is defined in the SDK header files.
When the profiler is available, once XPCOM is up:
- If the profiler is active, we immediately register the channel hook;
- Otherwise we register an observer and hold off on registering the hook until
the profiler is started, at which point we register the hook and remove the
observer.
Updated•4 years ago
|
Comment 2•4 years ago
|
||
(In reply to Aaron Klotz [:aklotz] from comment #0)
I've noticed code being added to our Windows builds that perform synchronous COM calls on the main thread of the browser process. Since synchronous IPC is banned
The Windows e10s a11y implementation relies heavily on sync COM. I assume this will show up for that? I guess we just need to make the perf team aware that a11y is a necessary exception here.
Assignee | ||
Comment 3•4 years ago
|
||
Yep. Maybe as a future enhancement we can filter out the relevant IIDs...
Comment 5•4 years ago
|
||
Backed out changeset c7984ec2a543 (bug 1646453) for causing leaks on Mochitests. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306811041&repo=autoland&lineNumber=13038
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306808011&repo=autoland&lineNumber=6054
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306808840&repo=autoland&lineNumber=50698
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedTaskRun=b9ecF9ZEQEKkucaAu6BADA.0&revision=c7984ec2a543e2beb6965d8af7d7f59fcb3a078e
Backout:
https://hg.mozilla.org/integration/autoland/rev/5de39c68950ab402e55d573b54ebebacdb3418e4
Assignee | ||
Comment 7•4 years ago
|
||
Comment 9•4 years ago
|
||
bugherder |
Description
•