Skip to content

Conversation

@DMaroo
Copy link

@DMaroo DMaroo commented Dec 6, 2022

This PR introduces an option (-z-print-pid) to be used when Env_vars.debug is set to true. This would print the PIDs of all the processes which magic-trace attaches to.

A demo output looks like this:

$ MAGIC_TRACE_DEBUG=1 magic-trace attach -p 245085,251541 -z-print-pid
Passed PIDs to perf: 245085,251541
<rest of the output>
<Ctrl+C>
$ /bin/cat &
[2] 251834
[2]  + suspended (tty input)  cat
$ MAGIC_TRACE_DEBUG=1 magic-trace attach -z-print-pid
<choose /bin/cat process using fzf>
Passed PIDs to perf: 251834
<rest of the output>
<Ctrl+C>

Done in collaboration with @Mantra-7.

Fixes #256.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write out the PID

1 participant