From patchwork Fri Oct 18 06:39:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohamad Gebai X-Patchwork-Id: 284449 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 64B252C00CB for ; Fri, 18 Oct 2013 17:42:33 +1100 (EST) Received: from localhost ([::1]:55975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX3lX-0000b6-D3 for incoming@patchwork.ozlabs.org; Fri, 18 Oct 2013 02:42:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX3jv-0006Y4-8a for qemu-devel@nongnu.org; Fri, 18 Oct 2013 02:40:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VX3jp-0007WQ-UQ for qemu-devel@nongnu.org; Fri, 18 Oct 2013 02:40:51 -0400 Received: from mail-qc0-x236.google.com ([2607:f8b0:400d:c01::236]:46189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX3jp-0007WD-QK for qemu-devel@nongnu.org; Fri, 18 Oct 2013 02:40:45 -0400 Received: by mail-qc0-f182.google.com with SMTP id n7so594650qcx.41 for ; Thu, 17 Oct 2013 23:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cj2bi1rU5/jMIKhJfl3/JbeKyXbA0iOoDtMNjJPibkE=; b=rkdg8L57vl9ZOjJLrecjfKq7Y8ymtT95kuboScbJWWSHl2Wwk7prTumlwdQvuy5DpL jSPI4SKFN9IVNc7FvjGWcRn1Myx3bUc+SC45jnL0p59wipzMK7CIYzOopejkUaI0kCyd rhS/1T315Tvze9DA3q/5WBUzqQXg0Yn/+mOgTlUhhMr2f5LCMug0flQ8erIbqfBRVAvL griTAVFftMaRoxlM460y/5+J5eefu9+m1gZjpQltYky5c3c6g31vRfaT8EoLn37ydiJC YVyiW+WJKZHkrwAHwCmkzmAlaH9ENR/EZS3f/HhRRncEp4znkzENdD8PAb/V9WDrCJ1t AwOg== X-Received: by 10.229.212.194 with SMTP id gt2mr1716263qcb.19.1382078445475; Thu, 17 Oct 2013 23:40:45 -0700 (PDT) Received: from localhost.localdomain (bas8-montreal19-1177796753.dsl.bell.ca. [70.51.192.145]) by mx.google.com with ESMTPSA id 4sm2437324qak.11.2013.10.17.23.40.44 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Oct 2013 23:40:45 -0700 (PDT) From: Mohamad Gebai To: qemu-devel@nongnu.org Date: Fri, 18 Oct 2013 02:39:52 -0400 Message-Id: <1382078393-11195-5-git-send-email-mohamad.gebai@polymtl.ca> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1382078393-11195-1-git-send-email-mohamad.gebai@polymtl.ca> References: <1382078393-11195-1-git-send-email-mohamad.gebai@polymtl.ca> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::236 Cc: Mohamad Gebai , alex.bennee@linaro.org Subject: [Qemu-devel] [PATCH v4 4/5] Update documentation for LTTng ust tracing 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 Signed-off-by: Mohamad Gebai --- docs/tracing.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/tracing.txt b/docs/tracing.txt index bfc261b..d7be2fd 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -214,6 +214,42 @@ The "ust" backend uses the LTTng Userspace Tracer library. There are no monitor commands built into QEMU, instead UST utilities should be used to list, enable/disable, and dump traces. +Package lttng-tools is required for userspace tracing. You must ensure that the +current user belongs to the "tracing" group, or manually launch the +lttng-sessiond daemon for the current user prior to running any instance of +Qemu. + +While running an instrumented Qemu, LTTng should be able to list all available +events: + + lttng list -u + +Create tracing session: + + lttng create mysession + +Enable events: + + lttng enable-event qemu:g_malloc -u + +Where the events can either be a comma-separated list of events, or "-a" to +enable all tracepoint events. Start and stop tracing as needed: + + lttng start + lttng stop + +View the trace: + + lttng view + +Destroy tracing session: + + lttng destroy + +Babeltrace can be used at any later time to view the trace: + + babeltrace $HOME/lttng-traces/mysession--