From f12b25521d41eacf1af8ce216fa2b39d81b54208 Mon Sep 17 00:00:00 2001 From: fche Date: Thu, 6 Oct 2005 18:59:50 +0000 Subject: [PATCH] 2005-10-06 Frank Ch. Eigler * stap.1.in: Document -b/-s options. * main.cxx (usage): Clarify -b/-s blurbs. * translator.cxx (translate_pass): Handle bulk_mode here instead. --- ChangeLog | 13 ++++++++----- main.cxx | 13 +++++++------ stap.1.in | 7 +++++++ translate.cxx | 3 +++ 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6f13cbbbf..a453322ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-10-06 Frank Ch. Eigler + + * 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 PR 1332. @@ -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 diff --git a/main.cxx b/main.cxx index d9c7e4633..f41334252 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 511ca0059..0c6974986 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 981d71df0..276382e5b 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"; -- 2.43.5