Message ID | 20200306092902.48786-1-tz.stoyanov@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | KernelShark2.0: Use libtracefs APIs to access tracefs | expand |
On Fri, 6 Mar 2020 11:29:00 +0200 "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote: > From: "Tzvetomir (VMware) Stoyanov" <tz.stoyanov@gmail.com> > > The tracefs library provides APIs for accessing files from tracefs. > The library is part of trace-cmd, it is installed as part of trace-cmd > installation. KernelShark uses some of those APIs and must be linked with > the library > > Tzvetomir (VMware) Stoyanov (2): > KernelShark2.0: Link KernelShark to libtracefs > KernelShark2.0: Use libtracefs APIs to access tracefs > I added these patches to the latest kernelshark-2.0 and it still doesn't work for me. I did a little debugging, and noticed that it fails while reading the guest trace.dat file with: plugin "kvm_combo" failed to initialize on stream /tmp/trace-host-Fedora21. It seems to require that the guest trace.dat file has kvm events? Note, as I build my guest kernel with a make localmodconfig, which disables all modules that are not necessary to boot the box, there is no kvm events there. I can see why the host may need them, but not the guest. I'll rebuild my guest kernel with kvm events and see if that solves this (but that shouldn't be the case). -- Steve
On Fri, 6 Mar 2020 15:13:56 -0500 Steven Rostedt <rostedt@goodmis.org> wrote: > On Fri, 6 Mar 2020 11:29:00 +0200 > "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote: > > > From: "Tzvetomir (VMware) Stoyanov" <tz.stoyanov@gmail.com> > > > > The tracefs library provides APIs for accessing files from tracefs. > > The library is part of trace-cmd, it is installed as part of trace-cmd > > installation. KernelShark uses some of those APIs and must be linked with > > the library > > > > Tzvetomir (VMware) Stoyanov (2): > > KernelShark2.0: Link KernelShark to libtracefs > > KernelShark2.0: Use libtracefs APIs to access tracefs > > > > I added these patches to the latest kernelshark-2.0 and it still doesn't > work for me. I did a little debugging, and noticed that it fails while > reading the guest trace.dat file with: > > plugin "kvm_combo" failed to initialize on stream /tmp/trace-host-Fedora21. > > It seems to require that the guest trace.dat file has kvm events? > > Note, as I build my guest kernel with a make localmodconfig, which disables > all modules that are not necessary to boot the box, there is no kvm events > there. I can see why the host may need them, but not the guest. I'll > rebuild my guest kernel with kvm events and see if that solves this (but > that shouldn't be the case). > Just confirmed it. If I add kvm events to the guest, it synchronizes automatically. Thus, it's a bug to expect the guest to have kvm events, as there's no reason for them to do so. -- Steve
On 6.03.20 г. 22:13 ч., Steven Rostedt wrote: > On Fri, 6 Mar 2020 11:29:00 +0200 > "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote: > >> From: "Tzvetomir (VMware) Stoyanov" <tz.stoyanov@gmail.com> >> >> The tracefs library provides APIs for accessing files from tracefs. >> The library is part of trace-cmd, it is installed as part of trace-cmd >> installation. KernelShark uses some of those APIs and must be linked with >> the library >> >> Tzvetomir (VMware) Stoyanov (2): >> KernelShark2.0: Link KernelShark to libtracefs >> KernelShark2.0: Use libtracefs APIs to access tracefs >> > > I added these patches to the latest kernelshark-2.0 and it still doesn't > work for me. I did a little debugging, and noticed that it fails while > reading the guest trace.dat file with: > > plugin "kvm_combo" failed to initialize on stream /tmp/trace-host-Fedora21. > > It seems to require that the guest trace.dat file has kvm events? Hi Steven, Yes it will fail to initialize in the guest's file if it does not contain kvm events and this is normal. The plugin only draws the additional graphical elements associated with kvm_entry and kvm_exit events. So nothing will be plotted on top of the guest data. The plugin itself has nothing to do with the synchronization of the timestamps. Thanks! Yordan > > Note, as I build my guest kernel with a make localmodconfig, which disables > all modules that are not necessary to boot the box, there is no kvm events > there. I can see why the host may need them, but not the guest. I'll > rebuild my guest kernel with kvm events and see if that solves this (but > that shouldn't be the case). > > -- Steve >
On 7.03.20 г. 0:34 ч., Steven Rostedt wrote: > On Fri, 6 Mar 2020 15:13:56 -0500 > Steven Rostedt <rostedt@goodmis.org> wrote: > >> On Fri, 6 Mar 2020 11:29:00 +0200 >> "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote: >> >>> From: "Tzvetomir (VMware) Stoyanov" <tz.stoyanov@gmail.com> >>> >>> The tracefs library provides APIs for accessing files from tracefs. >>> The library is part of trace-cmd, it is installed as part of trace-cmd >>> installation. KernelShark uses some of those APIs and must be linked with >>> the library >>> >>> Tzvetomir (VMware) Stoyanov (2): >>> KernelShark2.0: Link KernelShark to libtracefs >>> KernelShark2.0: Use libtracefs APIs to access tracefs >>> >> >> I added these patches to the latest kernelshark-2.0 and it still doesn't >> work for me. I did a little debugging, and noticed that it fails while >> reading the guest trace.dat file with: >> >> plugin "kvm_combo" failed to initialize on stream /tmp/trace-host-Fedora21. >> >> It seems to require that the guest trace.dat file has kvm events? >> >> Note, as I build my guest kernel with a make localmodconfig, which disables >> all modules that are not necessary to boot the box, there is no kvm events >> there. I can see why the host may need them, but not the guest. I'll >> rebuild my guest kernel with kvm events and see if that solves this (but >> that shouldn't be the case). >> > > Just confirmed it. If I add kvm events to the guest, it synchronizes > automatically. Thus, it's a bug to expect the guest to have kvm events, as > there's no reason for them to do so. Is it possible that something else gets enabled during the recording of the data, that actually makes the difference? Y. > > -- Steve >
On Mon, 9 Mar 2020 11:17:44 +0200 "Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote: > > Just confirmed it. If I add kvm events to the guest, it synchronizes > > automatically. Thus, it's a bug to expect the guest to have kvm events, as > > there's no reason for them to do so. > > Is it possible that something else gets enabled during the recording of > the data, that actually makes the difference? > Y. Unfortunately, I blew away the files with the issue and tried to reproduce it, and I can't :-/ Now even without the kvm events it appears to work. I may try one more thing (which is to rebuild the guest without KVM at all), and see if I can bring back the issue. But for now, I guess it's a "WORKS FOR ME" :-/ -- Steve
On Mon, 9 Mar 2020 11:44:08 -0400 Steven Rostedt <rostedt@goodmis.org> wrote: > Now even without the kvm events it appears to work. I may try one more > thing (which is to rebuild the guest without KVM at all), and see if I can > bring back the issue. But for now, I guess it's a "WORKS FOR ME" :-/ I still can't reproduce my original issue. Perhaps I did something wrong. So I guess we can ignore this. One thing I did notice when testing this, the "all" selection of the KVM combo plots doesn't seem to work. I have to select each VCPU individually. Do you see that too? -- Steve
From: "Tzvetomir (VMware) Stoyanov" <tz.stoyanov@gmail.com> The tracefs library provides APIs for accessing files from tracefs. The library is part of trace-cmd, it is installed as part of trace-cmd installation. KernelShark uses some of those APIs and must be linked with the library Tzvetomir (VMware) Stoyanov (2): KernelShark2.0: Link KernelShark to libtracefs KernelShark2.0: Use libtracefs APIs to access tracefs CMakeLists.txt | 3 ++- build/FindTraceCmd.cmake | 28 ++++++++++++++++++++++++++++ src/CMakeLists.txt | 2 ++ src/libkshark-tepdata.c | 5 +++-- 4 files changed, 35 insertions(+), 3 deletions(-)