Open Bug 1614043 Opened 6 years ago Updated 3 years ago

IPC profiling: "Compressed" IPC messages which are coalesced away do not appear in IPCIn

Categories

(Core :: Gecko Profiler, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mstange, Unassigned)

Details

Attachments

(2 files)

Example profile: https://perfht.ml/2S7KGUp
Compare the IPCOut events on the IPDL Background thread with the IPCIn events on the Web Content thread. They should be exact mirrors of each other, if it weren't for the fact that PVsync::Notify is a "compressed" message. This means that multiple pending Notify messages get coalesced into one message once the target thread gets a chance to process them.

At the moment, what seems to happen in this case is the following:

  • If multiple "origin" messages are compressed into one "destination" message, it's the final message that "perseveres" and the other messages that are "coalesced away".
  • On the sending side, the IPCOut marker for the persevering message shows the correct duration, and the IPCOut markers for the messages that were coalesced away show "unknown duration".
  • On the receiving side, there is one IPCIn marker for the compressed message, and it's showing a duration since the persevering message was sent. There is no indication on the receiving side that some messages were coalesced away.

However, I think it would make more sense to show delays since the first message was sent. So I think we want the following:

  • If multiple "origin" messages are compressed into one "destination" message, the first message should "persevere" and the other messages should be "coalesced away".
  • On the sending side, the IPCOut markers for all messages should show the duration until the compressed message fires on the other side. So these IPCOut markers would be overlapping.
  • On the receiving side, there should be one IPCIn marker for the compressed message, and it should show the duration since the first message was sent, because this is the total delay. Ideally, information about the other messages that were compressed into this message should also be available somehow.
Attached image combined screenshot —
Attached image illustration —

Interesting, I didn't realize these existed! Hopefully fixing this will eliminate the majority of "unknown duration" IPC markers (eliminating 100% of them will probably require emitting markers for non-profiled threads).

Assignee: nobody → jporter+bmo
Status: NEW → ASSIGNED

Sorry, there was a problem with the detection of inactive users. I'm reverting the change.

Assignee: nobody → jporterbugs
Status: NEW → ASSIGNED
Severity: normal → S3

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: jporterbugs → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: