summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--Makefile.target2
-rwxr-xr-xscripts/tracetool22
2 files changed, 19 insertions, 5 deletions
diff --git a/Makefile.target b/Makefile.target
index 9b0cf74c31..cff15f0e13 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -58,7 +58,7 @@ else
 TARGET_TYPE=system
 endif
 
-$(QEMU_PROG).stp:
+$(QEMU_PROG).stp: $(SRC_PATH)/trace-events
 	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool \
 		--$(TRACE_BACKEND) \
 		--binary $(bindir)/$(QEMU_PROG) \
diff --git a/scripts/tracetool b/scripts/tracetool
index d675daba2b..47389b62ea 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -161,6 +161,18 @@ linetoc_nop()
     return
 }
 
+linetod_nop()
+{
+    # Used when "disabled" events are processed
+    return
+}
+
+linetostap_nop()
+{
+    # Used when "disabled" events are processed
+    return
+}
+
 linetoc_end_nop()
 {
     return
@@ -494,10 +506,12 @@ EOF
     i=1
     for arg in $arglist
     do
-        # 'limit' is a reserved keyword
-        if [ "$arg" = "limit" ]; then
-          arg="_limit"
-        fi
+        # postfix reserved words with '_'
+        case "$arg" in
+            limit|in|next|self)
+                arg="${arg}_"
+                ;;
+        esac
         cat <<EOF
   $arg = \$arg$i;
 EOF