summaryrefslogtreecommitdiffstats
path: root/gen-stapmark.h
diff options
context:
space:
mode:
authorfche <fche>2007-12-01 14:56:25 +0000
committerfche <fche>2007-12-01 14:56:25 +0000
commitb171146c8e8d4fa749b8829c47750750dc19f11c (patch)
treed3ddb53a2c513b1d82268734cfeec480b9fdbe9d /gen-stapmark.h
parent530dc83b3e55713d36d14e14101f9e7e2e502e8d (diff)
downloadsystemtap-steved-b171146c8e8d4fa749b8829c47750750dc19f11c.tar.gz
systemtap-steved-b171146c8e8d4fa749b8829c47750750dc19f11c.tar.xz
systemtap-steved-b171146c8e8d4fa749b8829c47750750dc19f11c.zip
2007-12-01 Frank Ch. Eigler <fche@elastic.org>
* gen-stapmark.h, stapmark.h: Retire.
Diffstat (limited to 'gen-stapmark.h')
-rwxr-xr-xgen-stapmark.h47
1 files changed, 0 insertions, 47 deletions
diff --git a/gen-stapmark.h b/gen-stapmark.h
deleted file mode 100755
index 6e1a63e0..00000000
--- a/gen-stapmark.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /usr/bin/perl
-
-sub bitset {
- my $num = shift;
- my $bit = shift;
- return ($num & (1 << $bit));
-}
-
-sub gensn {
- my $permutation = shift;
- my $arity = shift;
-
- my $SN = "";
- for (0..$arity-1) { $SN .= bitset($permutation,$_) ? "S" : "N"; }
-
- 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 ",";}
- print bitset($permutation,$_)
- ? "const char *"
- : "int64_t"; }
- print "); \\\n";
- print " if (unlikely (__systemtap_mark_##n##_" . $SN . ")) \\\n";
- print " (void) (__systemtap_mark_##n##_" . $SN . "(";
- for (0..$arity-1) { if ($_) { print ",";}
- print "(a" . (($_)+1) . ")"; }
- print ")); \\\n";
- print "} while (0)\n\n";
-}
-
-sub permute {
- my $arity = shift;
- for (0 .. (1<<$arity)-1) {
- &gensn ($_, $arity);
- }
-}
-
-
-die "give me one number" unless $#ARGV == 0;
-
-print "/* Generated by '$0 @ARGV' on " . gmtime() . " */\n\n";
-
-for (0 .. $ARGV[0]) {
- &permute($_);
-}