summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--main.cxx13
-rw-r--r--stap.1.in7
-rw-r--r--translate.cxx3
4 files changed, 25 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f13cbbb..a453322e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-10-06 Frank Ch. Eigler <fche@elastic.org>
+ * stap.1.in: Document -b/-s options.
+ * main.cxx (usage): Clarify -b/-s blurbs.
+ * translator.cxx (translate_pass): Handle bulk_mode here instead.
+
+2005-10-06 Frank Ch. Eigler <fche@elastic.org>
+
PR 1332.
* translate.cxx (emit_symbol_data): New function to transcribe
a processed address->symbol lookup table, based upon /proc/kallsyms.
@@ -8,11 +14,8 @@
* buildrun.cxx (run_pass): Add bulk/buffer_size flags to flags
passed to stpd.
- * elaborate.h (run_pass): Add bulk/buffer_size flags to
- systemtap_session.
- * main.cxx (usage): Add -b (bulk), -s (buffer_size) cmdline option
- descriptions.
- * main.cxx (main): Add -b (bulk), -s (buffer_size) cmdline option
+ * elaborate.h (systemtap_session): Add bulk/buffer_size flags.
+ * main.cxx (usage,main): Add -b (bulk), -s (buffer_size) options.
processing.
2005-10-04 Graydon Hoare <graydon@redhat.com>
diff --git a/main.cxx b/main.cxx
index d9c7e463..f4133425 100644
--- a/main.cxx
+++ b/main.cxx
@@ -1,5 +1,6 @@
// systemtap translator/driver
// Copyright (C) 2005 Red Hat Inc.
+// Copyright (C) 2005 IBM Corp.
//
// This file is part of systemtap, and is free software. You can
// redistribute it and/or modify it under the terms of the GNU General
@@ -61,8 +62,8 @@ usage (systemtap_session& s)
<< " -k keep temporary directory" << endl
// << " -t test mode" << (s.test_mode ? " [set]" : "") << endl
<< " -g guru mode" << (s.guru_mode ? " [set]" : "") << endl
- << " -b bulk mode" << (s.bulk_mode ? " [set]" : "") << endl
- << " -s buffer size (in Mb)" << endl
+ << " -b bulk (relayfs) mode" << (s.bulk_mode ? " [set]" : "") << endl
+ << " -s NUM buffer size in megabytes" << endl
<< " -p NUM stop after pass NUM 1-5" << endl
<< " (parse, elaborate, translate, compile, run)" << endl
<< " -I DIR look in DIR for additional .stp script files";
@@ -78,10 +79,11 @@ usage (systemtap_session& s)
<< " " << s.runtime_path << endl
// << " -r RELEASE use kernel RELEASE, instead of" << endl
// << " " << s.kernel_release << endl
- << " -m MODULE set probe module name, instead of" << endl
- << " " << s.module_name << endl
+ << " -m MODULE set probe module name, instead of "
+ << s.module_name << endl
<< " -o FILE send output to file instead of stdout" << endl
- << " -c CMD start the probes, run CMD, and exit when it finishes" << endl
+ << " -c CMD start the probes, run CMD, and exit when it finishes"
+ << endl
<< " -x PID sets target() to PID" << endl
;
// -d: dump safety-related external references
@@ -203,7 +205,6 @@ main (int argc, char * const argv [])
case 'b':
s.bulk_mode = true;
- s.macros.push_back (string ("STP_RELAYFS"));
break;
case 's':
diff --git a/stap.1.in b/stap.1.in
index 511ca005..0c697498 100644
--- a/stap.1.in
+++ b/stap.1.in
@@ -90,6 +90,13 @@ kernel object.
Guru mode. Enables parsing of unsafe expert-level constructs like
embedded C.
.TP
+.BI \-b
+Use relayfs-based bulk mode for kernel-to-user data transfer.
+.TP
+.BI \-s NUM
+Use NUM megabyte buffers for kernel-to-user data transfer. On a
+multiprocessor in bulk mode, this is a per-processor amount.
+.TP
.BI \-p " NUM"
Stop after pass NUM. The passes are numbered 1-5: parse, elaborate,
translate, compile, run. See the
diff --git a/translate.cxx b/translate.cxx
index 981d71df..276382e5 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -2462,6 +2462,9 @@ translate_pass (systemtap_session& s)
s.op->newline() << "#define STP_STRING_SIZE MAXSTRINGLEN";
s.op->newline() << "#define STP_NUM_STRINGS 1";
+ if (s.bulk_mode)
+ s.op->newline() << "#define STP_RELAYFS";
+
s.op->newline() << "#if TEST_MODE";
s.op->newline() << "#include \"runtime.h\"";
s.op->newline() << "#else";