On 12/05/2021 15:55, Steven Rostedt wrote:
On Wed, 12 May 2021 15:51:52 +0200 Jerome Marchand <jmarchan@xxxxxxxxxx> wrote:Hi, Streams, and thus trace-cmd profile, are not working. A simple "trace-cmd profile ls" command exit with the following message "Creating stream for 0". I've been looking at it and the issue is that tracecmd_read_headers() tries to read the cmdlines, cpus and options sections that have not been written to the temporary file when called from trace_stream_init(). AFAICT, it is caused by the two following patches: commit 1eea02a4 ("trace-cmd: Write saved cmdlines in the trace file at the end of the trace.") which moved the writing of cmdlines from create_file_fd() to tracecmd_create_file_latency() and tracecmd_append_cpu_data() commit 5d4d7ec3 ("trace-cmd: Move reading of trace.dat options to tracecmd_read_headers()") which moved the reading of options and cpu datas to tracecmd_read_headers().Thanks for the report. I'm not surprised, profiling and streams have not been given the love they deserve (been focusing on host/guest tracing recently). Can you fill out a bug report on bugzilla?
Sure thing: https://bugzilla.kernel.org/show_bug.cgi?id=213045 Jerome
https://bugzilla.kernel.org/buglist.cgi?component=Trace-cmd%2FKernelshark&list_id=1090417&product=Tools&resolution=--- Thanks! -- Steve