On Thu, Nov 28, 2019 at 11:01 AM Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx> wrote: [...] > diff --git a/tracecmd/trace-agent.c b/tracecmd/trace-agent.c > index 1c6e0a3..cc330b7 100644 > --- a/tracecmd/trace-agent.c > +++ b/tracecmd/trace-agent.c > @@ -128,6 +128,7 @@ cleanup: > static void agent_handle(int sd, int nr_cpus, int page_size) > { > struct tracecmd_msg_handle *msg_handle; > + unsigned long long trace_id; > unsigned int *ports; > char **argv = NULL; > int argc = 0; > @@ -144,7 +145,8 @@ static void agent_handle(int sd, int nr_cpus, int page_size) > if (!msg_handle) > die("Failed to allocate message handle"); > > - ret = tracecmd_msg_recv_trace_req(msg_handle, &argc, &argv, &use_fifos); > + ret = tracecmd_msg_recv_trace_req(msg_handle, &argc, &argv, > + &use_fifos, &trace_id); Why is `tracecmd_msg_recv_trace_req` receiving trace_id if it's getting generated by the agent below? > if (ret < 0) > die("Failed to receive trace request"); > > @@ -153,13 +155,13 @@ static void agent_handle(int sd, int nr_cpus, int page_size) > > if (!use_fifos) > make_vsocks(nr_cpus, fds, ports); > - > + trace_id = tracecmd_generate_traceid(); > ret = tracecmd_msg_send_trace_resp(msg_handle, nr_cpus, page_size, > - ports, use_fifos); > + ports, use_fifos, trace_id); > if (ret < 0) > die("Failed to send trace response"); > - > - trace_record_agent(msg_handle, nr_cpus, fds, argc, argv, use_fifos); > + trace_record_agent(msg_handle, nr_cpus, fds, argc, argv, > + use_fifos, trace_id); > > free(argv[0]); > free(argv); Cheers, -- Slavi