SNIFF message pipe in mojo IPC

230 views
Skip to first unread message

Rafael

unread,
Apr 26, 2022, 1:14:39 AM4/26/22
to chromium-mojo
Hi all,
I have a compiled chromium at ubuntu server which can only run headless. Is there a recommended way to learn the data encapsulated in the message pipe (e.g., to figure out what would be sent between browser process and renderer process in the real world)? It can work like chromium ipc sniffer, but this only works on window. Thanks.

Andrew Williams

unread,
Apr 27, 2022, 12:37:03 PM4/27/22
to Rafael, chromium-mojo
Hi Rafael,

One thing you can do is compile Chromium using the `extended_tracing_enabled = true` gn arg and then collect trace files that will include detailed information about mojo messages (including the message contents).  I wrote a work-in-progress Python script [1] to print this information given a trace file, and more detailed instructions on how to collect trace files for this purpose can be found at the top of the script.

Hope that helps!

-Andrew


On Tue, Apr 26, 2022 at 1:14 AM Rafael <shinma...@gmail.com> wrote:
Hi all,
I have a compiled chromium at ubuntu server which can only run headless. Is there a recommended way to learn the data encapsulated in the message pipe (e.g., to figure out what would be sent between browser process and renderer process in the real world)? It can work like chromium ipc sniffer, but this only works on window. Thanks.

--
You received this message because you are subscribed to the Google Groups "chromium-mojo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-moj...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/57ca912c-8884-494e-9e74-e0c6dfb26d11n%40chromium.org.

David M

unread,
Apr 28, 2022, 12:43:32 AM4/28/22
to Andrew Williams, Rafael, chromium-mojo
Hi Rafael,
I enabled `extended_tracing_enabled = true`  and built the code in windows machine. may i know, where the mojom trace files will be placed.
Thanks in advance.
David

Andrew Williams

unread,
May 1, 2022, 10:43:57 PM5/1/22
to David M, Rafael, chromium-mojo
For trace files collected via chrome://tracing, the 'Save' button will save the file in the downloads folder.  For trace files collected using the `--enable-tracing` command line argument, IIRC they will be put in the current working directory by default but you can change the path using the `--enable-tracing-output=<output file path>` command line argument.

-Andrew
Reply all
Reply to author
Forward
0 new messages