From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prasun Ratn Subject: qemu/ftrace question Date: Tue, 20 Jun 2017 22:12:14 +0530 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" To: kvm@vger.kernel.org Return-path: Received: from mail-lf0-f48.google.com ([209.85.215.48]:36304 "EHLO mail-lf0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750951AbdFTQmg (ORCPT ); Tue, 20 Jun 2017 12:42:36 -0400 Received: by mail-lf0-f48.google.com with SMTP id o83so78465799lff.3 for ; Tue, 20 Jun 2017 09:42:36 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: Hi I am trying to get qemu events using ftrace but not seeing any events in the ftrace logs. I see kvm logs like the following but no qemu events such as virtio blk events. I'm using a locally compiled qemu version with ftrace backend enabled. [001] d... 9290.926939: kvm_exit: reason HLT rip 0xffffffff81058e95 info 0 0 This is how I am enabling ftrace logs: echo 1 >/sys/kernel/debug/tracing/events/kvm/enable echo 1 > /sys/kernel/debug/tracing/tracing_on # run cmd $CMD # disable trace echo 0 >/sys/kernel/debug/tracing/events/kvm/enable echo 0 > /sys/kernel/debug/tracing/tracing_on # copy trace echo Copying trace to $outfile cp /sys/kernel/debug/tracing/trace $outfile To debug, I build qemu with the 'log' backend, and I am able to see the appropriate events in /var/log/libvirt log files. However if I rebuild qemu with ftrace backend, I don't see any events. Do I need to enable any other tracing events in /sys/kernel/debug/tracing? Do I need to run any qemu monitor cmds? Any thing obvious I may be missing? Any debug steps recommended? I also tried using the simpletrace backend, but I am not sure where the trace files are created. I am using libvirt and /proc for the qemu process shows the cwd as '/' - I'm not sure what's supposed to happen here. Is it possible to collect simpletrace traces using libvirt? Thanks Prasun