Patchwork [v2,1/3] trace: [ust] fix generation of 'trace.c' on events without args

login
register
mail settings
Submitter =?utf-8?Q?Llu=C3=ADs?=
Date Nov. 9, 2010, 2:08 p.m.
Message ID <20101109140818.29831.83592.stgit@ginnungagap.bsc.es>
Download mbox | patch
Permalink /patch/70546/
State New
Headers show

Comments

=?utf-8?Q?Llu=C3=ADs?= - Nov. 9, 2010, 2:08 p.m.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
 tracetool |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Stefan Hajnoczi - Nov. 9, 2010, 2:17 p.m.
On Tue, Nov 9, 2010 at 2:08 PM, Lluís <xscript@gmx.net> wrote:
> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
> ---
>  tracetool |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

Patch

diff --git a/tracetool b/tracetool
index 7010858..f0fe01d 100755
--- a/tracetool
+++ b/tracetool
@@ -275,6 +275,7 @@  linetoc_ust()
     name=$(get_name "$1")
     args=$(get_args "$1")
     argnames=$(get_argnames "$1")
+    [ -z "$argnames" ] || argnames=", $argnames"
     fmt=$(get_fmt "$1")
 
     cat <<EOF
@@ -282,7 +283,7 @@  DEFINE_TRACE(ust_$name);
 
 static void ust_${name}_probe($args)
 {
-    trace_mark(ust, $name, "$fmt", $argnames);
+    trace_mark(ust, $name, "$fmt"$argnames);
 }
 EOF