From patchwork Sat May 22 21:08:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 101678 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 o4ML8hoE030929 for ; Sat, 22 May 2010 21:08:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758376Ab0EVVIi (ORCPT ); Sat, 22 May 2010 17:08:38 -0400 Received: from mtagate2.de.ibm.com ([195.212.17.162]:59994 "EHLO mtagate2.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758082Ab0EVVIh (ORCPT ); Sat, 22 May 2010 17:08: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 o4ML8VUX024371 for ; Sat, 22 May 2010 21:08:31 GMT Received: from d12av04.megacenter.de.ibm.com (d12av04.megacenter.de.ibm.com [9.149.165.229]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o4ML8Vvh847912 for ; Sat, 22 May 2010 23:08:31 +0200 Received: from d12av04.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o4ML8UFC021985 for ; Sat, 22 May 2010 23:08:31 +0200 Received: from stefan-thinkpad.ibm.com (sig-9-145-133-4.de.ibm.com [9.145.133.4]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id o4ML8SrR021941; Sat, 22 May 2010 23:08:30 +0200 From: Stefan Hajnoczi To: , Cc: Jan Kiszka , Prerna Saxena , Anthony Liguori , Stefan Hajnoczi Subject: [PATCH 3/5] trace: Add LTTng Userspace Tracer backend Date: Sat, 22 May 2010 22:08:21 +0100 Message-Id: <1274562503-10713-4-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1274562503-10713-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1274562503-10713-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]); Sat, 22 May 2010 21:08:43 +0000 (UTC) diff --git a/configure b/configure index d599879..307dbcb 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 bcd163e..72beb20 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 <