summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--buildrun.cxx1
-rw-r--r--main.cxx20
-rw-r--r--session.h1
-rw-r--r--stap.1.in4
5 files changed, 33 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2436ef53..de5881cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2006-05-09 Li Guanglei <guanglei@cn.ibm.com>
+ PR 2520
+ * main.cxx: add -M option to stop merge per-cpu files in bulk mode
+ * session.h: add merge member into systemtap_session
+ * buildrun.cxx: generate stpd_cmd to stop merge per-cpu files if -M
+ option is turned on by stap.
+
+2006-05-09 Li Guanglei <guanglei@cn.ibm.com>
PR 2647
+ Patch given by Gui Jian <guij@cn.ibm.com>
* runtime/vsprintf.c: %0s support to print null-terminated string
2006-05-08 Li Guanglei <guanglei@cn.ibm.com>
diff --git a/buildrun.cxx b/buildrun.cxx
index f71af527..ab2b85f6 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -113,6 +113,7 @@ run_pass (systemtap_session& s)
+ string(PKGLIBDIR) + "/stpd "
+ (s.bulk_mode ? "" : "-r ")
+ (s.verbose>1 ? "" : "-q ")
+ + (s.merge ? "" : "-m ")
+ "-u " + username + " "
+ (s.output_file.empty() ? "" : "-o " + s.output_file + " ");
diff --git a/main.cxx b/main.cxx
index ab13a516..95a1cfaa 100644
--- a/main.cxx
+++ b/main.cxx
@@ -67,6 +67,7 @@ usage (systemtap_session& s)
<< " -u unoptimized translation" << (s.unoptimized ? " [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 for bulk (relayfs) mode" << (s.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 "
@@ -136,6 +137,7 @@ main (int argc, char * const argv [])
s.keep_tmpdir = false;
s.cmd = "";
s.target_pid = 0;
+ s.merge=true;
const char* s_p = getenv ("SYSTEMTAP_TAPSET");
if (s_p != NULL)
@@ -151,7 +153,7 @@ main (int argc, char * const argv [])
while (true)
{
- int grc = getopt (argc, argv, "hVvtp:I:e:o:R:r:m:kgc:x:D:bs:u");
+ int grc = getopt (argc, argv, "hVMvtp:I:e:o:R:r:m:kgc:x:D:bs:u");
if (grc < 0)
break;
switch (grc)
@@ -160,6 +162,10 @@ main (int argc, char * const argv [])
version ();
exit (0);
+ case 'M':
+ s.merge = false;
+ break;
+
case 'v':
s.verbose ++;
break;
@@ -247,6 +253,18 @@ main (int argc, char * const argv [])
}
}
+ if(!s.bulk_mode && !s.merge)
+ {
+ cerr << "-M option is valid only for bulk (relayfs) mode." <<endl;
+ exit(1);
+ }
+
+ if(!s.output_file.empty() && s.bulk_mode && !s.merge)
+ {
+ cerr << "You can't specify -M, -b and -o options together." <<endl;
+ exit(1);
+ }
+
for (int i = optind; i < argc; i++)
{
if (! have_script)
diff --git a/session.h b/session.h
index ef966d78..b9f86991 100644
--- a/session.h
+++ b/session.h
@@ -75,6 +75,7 @@ struct systemtap_session
bool guru_mode;
bool bulk_mode;
bool unoptimized;
+ bool merge;
int buffer_size;
// temporary directory for module builds etc.
diff --git a/stap.1.in b/stap.1.in
index 65b4b312..361a211b 100644
--- a/stap.1.in
+++ b/stap.1.in
@@ -105,6 +105,10 @@ Unoptimized mode. Disable unused code elision during elaboration.
.BI \-b
Use relayfs-based bulk mode for kernel-to-user data transfer.
.TP
+.BI \-M
+Don't merge per-cpu files when using bulk (relayfs) mode. This option is
+valid for bulk mode.
+.TP
.B \-t
Collect timing information on the number of times probe executes
and average amount of time spent in each probe.