Bug 216404
Summary: | kernelshark: function_graph indent broken in list area | ||
---|---|---|---|
Product: | Tools | Reporter: | Andrej Stender (andrej.stender) |
Component: | Trace-cmd/Kernelshark | Assignee: | Default virtual assignee for Trace-cmd and kernelshark (tools_tracecmd_kernelshark) |
Status: | NEW --- | ||
Severity: | normal | CC: | y.karadz |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.18.16 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | Screenshot of List Area |
Hi Andrej, Thanks a lot for reporting this problem! I agree with you that it will be better if we use a fixed width font. However, using different fonts in the different columns of the table will most likely look ugly. Also there are cases when the number of columns displayed by the table changes, so you will need extra logic to find which column to change. So let's change the font in all columns. All properties of the table widget are set here: https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/tree/src/KsTraceViewer.cpp#n125 You can add couple of lines, setting a font that has the fixed width. https://doc.qt.io/qt-6/qwidget.html#font-prop Perhaps, one from the 'monospace' family will do the job. I know very little about fonts, so I am leaving to you to find solution that displays the function graph data correctly. Send me a patch and I will be happy to take it. cheers, Yordan Hi Yordan, thanks for the quick reply. Ok, I'll take a look at the code and see what I can do. Best regards, Andrej |
Created attachment 301638 [details] Screenshot of List Area When loading a trace.dat in kernelshark which has been created by using the function_graph tracer, then the C-style indentation is shown in a broken way in the List Area 'Info' column, because kernelshark does not use a fixed width font (see screenshot). As a workaround, I used a config file of my KDE to force a fixed width font for the application kernelshark. Then all looked fine. kernelshark: v2.1.1 Wouldn't it make sense to use a fixed width font by default in the 'Info' column of the List Area (at least when function_tracer is used, if that distinction can easily be made)? Anyway, kernelshark is a great tool which helps me a lot. Thanks for creating it!