From patchwork Thu Jan 30 03:47:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mohamad Gebai X-Patchwork-Id: 315258 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5E4A12C00CD for ; Thu, 30 Jan 2014 14:50:44 +1100 (EST) Received: from localhost ([::1]:46294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8ieI-0001mI-3C for incoming@patchwork.ozlabs.org; Wed, 29 Jan 2014 22:50:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8icE-0006tv-Cp for qemu-devel@nongnu.org; Wed, 29 Jan 2014 22:48:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8ic9-0007io-8B for qemu-devel@nongnu.org; Wed, 29 Jan 2014 22:48:34 -0500 Received: from mail-qa0-x22d.google.com ([2607:f8b0:400d:c00::22d]:35015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8ic9-0007ie-46 for qemu-devel@nongnu.org; Wed, 29 Jan 2014 22:48:29 -0500 Received: by mail-qa0-f45.google.com with SMTP id ii20so3615149qab.4 for ; Wed, 29 Jan 2014 19:48:28 -0800 (PST) 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=PVgsomyh99BxwdbvsR35HZANR7cxl8SHj7aqPpUqW5Y=; b=xgExdmtajvjyP6qrTVJ6wzp8yFnTla63TU0AP0pmm5vjaONmmEd9pSZyKmxJUaW0vU KN04Nror3xgsdP16uOscO+NVIEQ4FwQ8mTXrCWeuCIOhM5z22v1N3MpbzsDSCGcbesov LOSOfDj11Tz2LotHwN6idixmc2EDMJ9V9QqViBeazSF7Lo6hXsB9I90RQgLflKq9BE6F R5GAOWaM8B4ndPHN9D2Dbvh9HnEoSQTk5Ynm6Vw40/H9J8s6OTt7HHsBzRf4p7HWT+XR SKncqZRYESwd+lpy5YgLvKp6c023BkvPc50RMj6g8EUysoCLWCe8DUdJr/vrdYRKlL+p +NvQ== X-Received: by 10.140.42.51 with SMTP id b48mr17312807qga.23.1391053708708; Wed, 29 Jan 2014 19:48:28 -0800 (PST) Received: from localhost.localdomain (modemcable045.98-21-96.mc.videotron.ca. [96.21.98.45]) by mx.google.com with ESMTPSA id w8sm13127873qag.15.2014.01.29.19.48.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Jan 2014 19:48:28 -0800 (PST) From: Mohamad Gebai To: qemu-devel@nongnu.org Date: Wed, 29 Jan 2014 22:47:57 -0500 Message-Id: <1391053678-25398-5-git-send-email-mohamad.gebai@polymtl.ca> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1391053678-25398-1-git-send-email-mohamad.gebai@polymtl.ca> References: <1391053678-25398-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:c00::22d Cc: stefanha@gmail.com, Mohamad Gebai , alex.bennee@linaro.org Subject: [Qemu-devel] [PATCH v6 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 Reviewed-by: Alex Bennée --- docs/tracing.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/tracing.txt b/docs/tracing.txt index bfc261b..bf2e15c 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--