#!/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 < EOF } linetoh_stderr() { local name args argnames argc fmt name=$(get_name "$1") args=$(get_args "$1") argnames=$(get_argnames "$1" ",") argc=$(get_argc "$1") fmt=$(get_fmt "$1") if [ "$argc" -gt 0 ]; then argnames=", $argnames" fi cat <" 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", ",") [ -z "$argnames" ] || argnames=", $argnames" fmt=$(get_fmt "$1") cat <