How to record in code trace and sampling trace in parallel
Hi, I can capture both separately (not at the same time - that is my question) using the tools below on Linux: track_event/in code trace: traced + traced_probes + (perfetto with output trace specified here) sampling (flamegraph): tracebox with output trace specified
When I tried to use both at the same time I find tracebox also fires up traced + traced_probes of its own. My questions are: Would 2 instances of traced and trced_probes cause problems? If so, is there a way to avoid tracebox launching the above processes and still captures the sampling trace at the same time perfetto captures the in-code trace.
Thanks.
See also: https://github.com/google/perfetto/issues/1018#issuecomment-3145760810
🤖 Hi @sifangli-labs, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.
I think you are complicating things significantly. Just use:
tracebox --system-sockets -c <config> --txt -o <out file>
Don't run traced, traced_probes etc. Depending on the config, you can choose to collect stack sampling or not, ftrace or not, track event or not etc.