summaryrefslogtreecommitdiffstats
path: root/gen-stapmark.h
diff options
context:
space:
mode:
Diffstat (limited to 'gen-stapmark.h')
-rwxr-xr-xgen-stapmark.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/gen-stapmark.h b/gen-stapmark.h
index f7fb84d7..6e1a63e0 100755
--- a/gen-stapmark.h
+++ b/gen-stapmark.h
@@ -13,9 +13,8 @@ sub gensn {
my $SN = "";
for (0..$arity-1) { $SN .= bitset($permutation,$_) ? "S" : "N"; }
- print "#define STAP_MARK_" . $SN . "(n,";
- for (0..$arity-1) { if ($_) { print ",";}
- print "a" . (($_)+1); }
+ print "#define STAP_MARK" . ($arity>0?"_":"") . $SN . "(n";
+ for (0..$arity-1) { print ",a" . (($_)+1); }
print ") do { \\\n";
print " static void (*__systemtap_mark_##n##_" . $SN . ")(";
for (0..$arity-1) { if ($_) { print ",";}
@@ -43,6 +42,6 @@ die "give me one number" unless $#ARGV == 0;
print "/* Generated by '$0 @ARGV' on " . gmtime() . " */\n\n";
-for (1 .. $ARGV[0]) {
+for (0 .. $ARGV[0]) {
&permute($_);
}