From 4c3b5a4891c44ebbc23d80f95e5b66e2ec66b8b1 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Thu, 20 Jan 2011 20:54:21 +0000 Subject: Add scripts directory Move build and user scripts into scripts directory. Signed-off-by: Blue Swirl --- scripts/tracetool | 573 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 573 insertions(+) create mode 100755 scripts/tracetool (limited to 'scripts/tracetool') diff --git a/scripts/tracetool b/scripts/tracetool new file mode 100755 index 0000000..fce491c --- /dev/null +++ b/scripts/tracetool @@ -0,0 +1,573 @@ +#!/bin/sh +# +# Code generator for trace events +# +# Copyright IBM, Corp. 2010 +# +# This work is licensed under the terms of the GNU GPL, version 2. See +# the COPYING file in the top-level directory. + +# Disable pathname expansion, makes processing text with '*' characters simpler +set -f + +usage() +{ + cat >&2 <" + ust_clean_namespace +} + +linetoh_ust() +{ + local name args argnames + name=$(get_name "$1") + args=$(get_args "$1") + argnames=$(get_argnames "$1", ",") + + cat < +$(ust_clean_namespace) +#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 <