This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[SAMPLE][PATCH 2/3]BTI: additional patch for BTI
- From: Masami Hiramatsu <hiramatu at sdl dot hitachi dot co dot jp>
- To: systemtap at sources dot redhat dot com
- Cc: Yumiko Sugita <sugita at sdl dot hitachi dot co dot jp>, Satoshi Oshima <soshima at redhat dot com>, Hideo Aoki <haoki at redhat dot com>
- Date: Thu, 15 Dec 2005 17:21:31 +0900
- Subject: [SAMPLE][PATCH 2/3]BTI: additional patch for BTI
Hi,
Here is an additional patch for BTI. This patch adds an option (-M)
that prohibits merging to stap command.
If you would like to use BTI, you should specify -M and -b options to
the stap command.
--
Masami HIRAMATSU
2nd Research Dept.
Hitachi, Ltd., Systems Development Laboratory
E-mail: hiramatu@sdl.hitachi.co.jp
Signed-off-by: Masami Hiramatsu <hiramatu@sdl.hitachi.co.jp>
buildrun.cxx | 1 +
main.cxx | 8 +++++++-
session.h | 1 +
3 files changed, 9 insertions(+), 1 deletion(-)
diff -Narup -x CVS a/buildrun.cxx b/buildrun.cxx
--- a/buildrun.cxx 2005-10-20 04:35:35.000000000 +0900
+++ b/buildrun.cxx 2005-12-05 17:45:18.000000000 +0900
@@ -148,6 +148,7 @@ run_pass (systemtap_session& s)
string stpd_cmd = string("sudo ")
+ string(PKGLIBDIR) + "/stpd "
+ (s.bulk_mode ? "" : "-r ")
+ + (s.no_merge ? "-m " : "")
+ (s.verbose ? "" : "-q ")
+ (s.output_file.empty() ? "" : "-o " + s.output_file + " ");
diff -Narup -x CVS a/main.cxx b/main.cxx
--- a/main.cxx 2005-11-25 07:45:52.000000000 +0900
+++ b/main.cxx 2005-12-05 17:45:18.000000000 +0900
@@ -63,6 +63,7 @@ usage (systemtap_session& s)
// << " -t test mode" << (s.test_mode ? " [set]" : "") << endl
<< " -g guru mode" << (s.guru_mode ? " [set]" : "") << endl
<< " -b bulk (relayfs) mode" << (s.bulk_mode ? " [set]" : "") << endl
+ << " -M Don't merge per-cpu files. " << (s.no_merge ? " [set]" : "") << endl
<< " -s NUM buffer size in megabytes, instead of "
<< s.buffer_size << endl
<< " -p NUM stop after pass NUM 1-5, instead of "
@@ -123,6 +124,7 @@ main (int argc, char * const argv [])
s.test_mode = false;
s.guru_mode = false;
s.bulk_mode = false;
+ s.no_merge = false;
s.buffer_size = 0;
s.last_pass = 5;
s.module_name = "stap_" + stringify(getpid());
@@ -145,7 +147,7 @@ main (int argc, char * const argv [])
while (true)
{
- int grc = getopt (argc, argv, "hVvp:I:e:o:tR:r:m:kgc:x:D:bs:");
+ int grc = getopt (argc, argv, "hVvp:I:e:o:tR:r:m:Mkgc:x:D:bs:");
if (grc < 0)
break;
switch (grc)
@@ -198,6 +200,10 @@ main (int argc, char * const argv [])
s.kernel_release = string (optarg);
break;
+ case 'M':
+ s.no_merge = true;
+ break;
+
case 'k':
s.keep_tmpdir = true;
break;
diff -Narup -x CVS a/session.h b/session.h
--- a/session.h 2005-11-25 07:45:52.000000000 +0900
+++ b/session.h 2005-12-05 17:45:18.000000000 +0900
@@ -75,6 +75,7 @@ struct systemtap_session
bool guru_mode;
bool bulk_mode;
int buffer_size;
+ bool no_merge;
// temporary directory for module builds etc.
// hazardous - it is "rm -rf"'d at exit