From patchwork Wed Apr 3 06:30:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eiichi Tsukata X-Patchwork-Id: 233297 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D86FD2C0178 for ; Wed, 3 Apr 2013 17:32:43 +1100 (EST) Received: from localhost ([::1]:53931 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNHFS-0004rk-2X for incoming@patchwork.ozlabs.org; Wed, 03 Apr 2013 02:32:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNHE7-0003Om-DE for qemu-devel@nongnu.org; Wed, 03 Apr 2013 02:31:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNHE2-0007Pg-UD for qemu-devel@nongnu.org; Wed, 03 Apr 2013 02:31:19 -0400 Received: from mail4.hitachi.co.jp ([133.145.228.5]:42317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNHE2-0007PV-LB for qemu-devel@nongnu.org; Wed, 03 Apr 2013 02:31:14 -0400 Received: from mlsv2.hitachi.co.jp (unknown [133.144.234.166]) by mail4.hitachi.co.jp (Postfix) with ESMTP id F2EED33CCB for ; Wed, 3 Apr 2013 15:31:12 +0900 (JST) Received: from mfilter03.hitachi.co.jp by mlsv2.hitachi.co.jp (8.13.1/8.13.1) id r336VCjJ010883; Wed, 3 Apr 2013 15:31:12 +0900 Received: from vshuts04.hitachi.co.jp (vshuts04.hitachi.co.jp [10.201.6.86]) by mfilter03.hitachi.co.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id r336VBqM027856 for ; Wed, 3 Apr 2013 15:31:12 +0900 Received: from gmml27.itg.hitachi.co.jp (unknown [158.213.165.130]) by vshuts04.hitachi.co.jp (Postfix) with ESMTP id 7A3A514006E; Wed, 3 Apr 2013 15:31:12 +0900 (JST) Received: from tkt.sdl.hitachi.co.jp by gmml27.itg.hitachi.co.jp (AIX5.2/8.11.6p2/8.11.0) id r336VC02670666; Wed, 3 Apr 2013 15:31:12 +0900 From: Eiichi Tsukata To: qemu-devel@nongnu.org Date: Wed, 3 Apr 2013 15:30:59 +0900 Message-Id: <1364970659-5715-3-git-send-email-eiichi.tsukata.xh@hitachi.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1364970659-5715-1-git-send-email-eiichi.tsukata.xh@hitachi.com> References: <1364970659-5715-1-git-send-email-eiichi.tsukata.xh@hitachi.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 133.145.228.5 Cc: Eiichi Tsukata Subject: [Qemu-devel] [PATCH 2/2] trace: document frace backend X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Add documentation of ftrace backend. Signed-off-by: Eiichi Tsukata --- docs/tracing.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/tracing.txt b/docs/tracing.txt index cf53c17..60ff9c5 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -175,6 +175,22 @@ unless you have specific needs for more advanced backends. The "simple" backend currently does not capture string arguments, it simply records the char* pointer value instead of the string that is pointed to. +=== Ftrace === + +The "ftrace" backend writes trace data to ftrace marker. This effectively +sends trace events to ftrace ring buffer, and you can compare qemu trace +data and kernel(especially kvm.ko when using KVM) trace data. + +if you use KVM, enable kvm events in ftrace: + + # echo 1 > /sys/kernel/debug/tracing/events/kvm/enable + +After running qemu by root user, you can get the trace: + + # cat /sys/kernel/debug/tracing/trace + +Restriction: "ftrace" backend is restricted to Linux only. + ==== Monitor commands ==== * trace-file on|off|flush|set