Hi Nick,

> Would it be possible to forward SIGUSRn from child processes to the
> parent process, so that it's easier to use this?  I.e., so that
> consumers can't screw up searching for the relevant process?

Absolutely. This is a bit of follow-on work that I've not quite got around to just yet. It should be fairly straightforward, modulo a bit of IPC funkiness.

> Finally: I want it for Windows, where I do most of my work.  Is there a
> technical path to achieving this?

Yes, I hope! I know of some approaches that might work (though I'm no windows expert), and I'm tracking this work in Bug 1867328.

Cheers,
Adam

On 13/11/2024 18:33, Nick Alexander wrote:
Adam,

On Wed, Nov 13, 2024 at 10:03 AM 'Adam Brouwers-Harries' via firefox- [email protected] <mailto:[email protected]> <firefox- [email protected] <mailto:[email protected]>> wrote:

    Hello all,

    In Firefox 131 we shipped the ability to control the Firefox profiler
    using POSIX signals on MacOS and Linux [0]. Send SIGUSR1 to Firefox's
    main process to start the profiler, and SIGUSR2 to stop the profiler
    and
    dump a json profile to disk.

    We hope that this feature will be useful for debugging Firefox in
    situations where controlling the profiler via "traditional" means (such
    as the UI or keyboard shortcuts) is not possible. We are already using
    this functionality to attempt to gather a profile if Firefox hangs
    while
    being tested in CI [1], so if you find yourself facing any intermittent
    hangs, look to the artefacts panel in treeherder for a useful profile!

    Please see profiler front-end documentation for more details of using
    the feature [2], and the inline documentation if you are interested in
    the implementation [3].

    Finally, please reach out if you find any issues, novel uses, or manage
    to fix any particularly gnarly bugs using this!


This is great news!  I've wanted this -- very infrequently -- for a long time.

Would it be possible to forward SIGUSRn from child processes to the parent process, so that it's easier to use this?  I.e., so that consumers can't screw up searching for the relevant process?

Finally: I want it for Windows, where I do most of my work.  Is there a technical path to achieving this?

Thanks again!
Nick


--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/3bc8fdd6-9d90-469a-abb6-a05bc57072a2%40mozilla.com.

Reply via email to