From patchwork Tue May 25 10:24:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 102155 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4PAOgkQ003141 for ; Tue, 25 May 2010 10:24:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757162Ab0EYKYk (ORCPT ); Tue, 25 May 2010 06:24:40 -0400 Received: from mtagate2.de.ibm.com ([195.212.17.162]:55707 "EHLO mtagate2.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757044Ab0EYKYh (ORCPT ); Tue, 25 May 2010 06:24:37 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.13.1/8.13.1) with ESMTP id o4PAOapk020481 for ; Tue, 25 May 2010 10:24:36 GMT Received: from d12av01.megacenter.de.ibm.com (d12av01.megacenter.de.ibm.com [9.149.165.212]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o4PAOaVt909332 for ; Tue, 25 May 2010 12:24:36 +0200 Received: from d12av01.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av01.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o4PAOZUo009050 for ; Tue, 25 May 2010 12:24:36 +0200 Received: from stefan-thinkpad.manchester-maybrook.uk.ibm.com (dyn-9-174-219-32.manchester-maybrook.uk.ibm.com [9.174.219.32]) by d12av01.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id o4PAOX0f008947; Tue, 25 May 2010 12:24:35 +0200 From: Stefan Hajnoczi To: , Cc: Jan Kiszka , Prerna Saxena , Anthony Liguori , Avi Kivity , Stefan Hajnoczi Subject: [PATCH 4/7] trace: Add LTTng Userspace Tracer backend Date: Tue, 25 May 2010 11:24:13 +0100 Message-Id: <1274783056-14759-5-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1274783056-14759-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1274783056-14759-1-git-send-email-stefanha@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 25 May 2010 10:24:42 +0000 (UTC) diff --git a/configure b/configure index 7d2c69b..675d0fc 100755 --- a/configure +++ b/configure @@ -829,7 +829,7 @@ echo " --enable-docs enable documentation build" echo " --disable-docs disable documentation build" echo " --disable-vhost-net disable vhost-net acceleration support" echo " --enable-vhost-net enable vhost-net acceleration support" -echo " --trace-backend=B Trace backend nop simple" +echo " --trace-backend=B Trace backend nop simple ust" echo "" echo "NOTE: The object files are built at the place where configure is launched" exit 1 @@ -2302,6 +2302,9 @@ bsd) esac echo "TRACE_BACKEND=$trace_backend" >> $config_host_mak +if test "$trace_backend" = "ust"; then + LIBS="-lust $LIBS" +fi tools= if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then diff --git a/tracetool b/tracetool index f094ddc..9ea9c08 100755 --- a/tracetool +++ b/tracetool @@ -3,12 +3,13 @@ usage() { cat >&2 <" +} + +linetoh_ust() +{ + local name args argnames + name=$(get_name "$1") + args=$(get_args "$1") + argnames=$(get_argnames "$1") + + cat < +#include "trace.h" +EOF +} + +linetoc_ust() +{ + local name args argnames fmt + name=$(get_name "$1") + args=$(get_args "$1") + argnames=$(get_argnames "$1") + fmt=$(get_fmt "$1") + + cat <