From patchwork Sun Mar 11 16:13:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Teoh X-Patchwork-Id: 146017 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 20456B6FA4 for ; Mon, 12 Mar 2012 07:52:31 +1100 (EST) Received: from localhost ([::1]:49987 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6pkj-000814-1D for incoming@patchwork.ozlabs.org; Sun, 11 Mar 2012 16:52:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6lP1-0003z8-6p for qemu-devel@nongnu.org; Sun, 11 Mar 2012 12:13:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6lOz-0008ES-AN for qemu-devel@nongnu.org; Sun, 11 Mar 2012 12:13:46 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:57661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6lOz-0008ED-1z for qemu-devel@nongnu.org; Sun, 11 Mar 2012 12:13:45 -0400 Received: by ggnj2 with SMTP id j2so2286657ggn.4 for ; Sun, 11 Mar 2012 09:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=ueV0rCqPYghqgcPiR7gSExqdoMe13bj2WMQWjmlOFhM=; b=CzVhdzB5sOJjlcHRJpqy6gpp8J4+PB2EdDl7Z5mUUjCASRdzTXL8hhanaxcoWYQHRx lhK0ozFCeFkqyfuSJbQnvIq+71aNclep3OkaZJXnL4BKW9BlERuzOJP8AZkcMJPlM68I u9XaCL+/fVGubrqatGNaW6CwLaQTri7Jw+BH5rKX17Rca5NwmwkPpIJGfu6Mue3NNkSj fO+gw9G27JrieqrK/OAx4KpG4PQUOrKFO0ZACYXPkDhLMkv/31W2AqPJmEQch+fMkuwH 9zcaUtzOkUGiemxhmLw18Z5J56JK5szUrdATWDJ/fSvwr1Ku0hx5oQCmy9mLkeLFbKv5 AcEQ== MIME-Version: 1.0 Received: by 10.101.99.3 with SMTP id b3mr3166527anm.81.1331482421041; Sun, 11 Mar 2012 09:13:41 -0700 (PDT) Received: by 10.146.123.20 with HTTP; Sun, 11 Mar 2012 09:13:40 -0700 (PDT) Date: Mon, 12 Mar 2012 00:13:40 +0800 Message-ID: From: Peter Teoh To: qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.161.173 X-Mailman-Approved-At: Sun, 11 Mar 2012 16:52:20 -0400 Cc: Stefan Hajnoczi Subject: [Qemu-devel] [PATCH] Tracing documentation changes 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 I was trying out the tracing feature of QEMU after checking out the git tree at git://git.qemu.org/qemu.git, and managed to generate some traces, but the following are the changes needed to the documentation, in order to successfully generate the tracing. Some comments: qemu-system-i386 was used because the present git tree does not generate any qemu binary at all. Comments? --- Regards, Peter Teoh diff --git a/docs/tracing.txt b/docs/tracing.txt index ea29f2c..ca5022a 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -9,7 +9,7 @@ for debugging, profiling, and observing execution. 1. Build with the 'simple' trace backend: - ./configure --trace-backend=simple + ./configure --enable-trace-backend=simple make 2. Create a file with the events you want to trace: @@ -19,11 +19,19 @@ for debugging, profiling, and observing execution. 3. Run the virtual machine to produce a trace file: - qemu -trace events=/tmp/events ... # your normal QEMU invocation + qemu-system-i386 -trace events=/tmp/events ... # your normal QEMU invocation + + For example: + + qemu-system-i386 -trace events=/tmp/events -hda ./linux-0.2.img -kernel ./vmlinuz-2.6.35-22-generic -append "root=/dev/sda" -initrd ./initrd.img-2.6.35-22-generic + + where linux-0.2.img is the "dd" image containing the root filesystem, vmlinuz-* is the kernel file, and initrd-* is the initrd file. 4. Pretty-print the binary trace file: - ./simpletrace.py trace-events trace-* + ./scripts/simpletrace.py trace-events trace-1958 + + where trace-1958 is one of the local files produced from earlier tracing in Step 3. == Trace events ==