gpuvis icon indicating copy to clipboard operation
gpuvis copied to clipboard

Can not load trace when using current trace-cmd master

Open subdiff opened this issue 5 years ago • 10 comments

Following error message appears in GPUVis log:

[Error] handle_options: unknown option 11
[Error] read_trace_file: setjmp error called for trace_06-15-2020_20-11-53.dat.
[Error] load_trace_file(trace_06-15-2020_20-11-53.dat) failed.

subdiff avatar Jun 15 '20 18:06 subdiff

Repo: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git Checkout at: 27ee7e41e5f5e3f134ce985fec03b1386f30e45f

subdiff avatar Jun 15 '20 18:06 subdiff

This issue seems to back with a different error message when trying to open traces captured with trace-cmd 3.0.3:

[Error] read_header_files: header_page not found.
[Error] read_trace_file: setjmp error called for trace.dat

Rolling back to trace-cmd 2.9.7 makes it work again.

Oschowa avatar Apr 20 '22 14:04 Oschowa

Can you try the libtraceevent branch and see if it still happens? And if it does, is it possible to send me a trace that fails? Thanks Oschowa.

mikesart avatar May 01 '22 23:05 mikesart

I'm still getting the same error on the libtraceevent branch, here's a sample trace: trace_05-06-2022_17-19-23.zip

Oschowa avatar May 06 '22 15:05 Oschowa

Apologies for the late reply - been a bit slammed at work. So it looks like they added a compressed page format so this bit of code:

337├───> if ( memcmp( buf, "header_page", 12 ) != 0 ) 338│ die( handle, "%s: header_page not found.\n", func );

Is failing because buf is "zstd". Do you have a way to disable this compression with the latest trace-cmd? I'll look at adding this but will take a bit of time. Thanks Oschowa.

mikesart avatar Jun 14 '22 23:06 mikesart

Got Oschowa's zstd sample trace loading in gpuvis. This is all on Linux only right now cause I had to pull in a lot of the libtracefs, trace-cmd, and libtraceevent code and all this stuff relies a lot on gcc extensions and Linux header files, functions, etc.

Lot of work still to go to verify older traces (some of which aren't loading right now) and make sure new ones load correctly and with decent performance.

Then have to get all this working on Windows. :sob:

image

mikesart avatar Sep 10 '22 02:09 mikesart

Can you push the branch? would be nice for us linux users to be able to use :P

YellowOnion avatar Nov 12 '22 01:11 YellowOnion

Pushed it to zstd branch:

https://github.com/mikesart/gpuvis/tree/zstd

And sorry - just recently started a new job and have been kinda slammed...

mikesart avatar Nov 12 '22 05:11 mikesart

trace-cmd Version 3.1.5 has been released with file version 7 as the default for recordings.

As a workaround, a tracefile can be converted to version 6 to be opened with gpuvis using the command:

trace-cmd convert -i trace-7.dat -o trace-6.dat --file-version 6

lostgoat avatar Dec 30 '22 15:12 lostgoat

Wow, zstd makes trace files 6 times smaller. I hope it will be supported here soon. Thanks lostgoat for workaround.

uis246 avatar Feb 06 '24 17:02 uis246