diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | buildrun.cxx | 5 | ||||
-rw-r--r-- | elaborate.h | 2 | ||||
-rw-r--r-- | main.cxx | 20 | ||||
-rw-r--r-- | runtime/transport/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/transport/transport.c | 4 | ||||
-rw-r--r-- | runtime/transport/transport.h | 2 |
7 files changed, 45 insertions, 4 deletions
@@ -1,3 +1,14 @@ +2005-10-05 Tom Zanussi <zanussi@us.ibm.com> + + * 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 + processing. + 2005-10-04 Graydon Hoare <graydon@redhat.com> PR 1131. diff --git a/buildrun.cxx b/buildrun.cxx index 598d7110..ca3f862a 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -147,7 +147,7 @@ run_pass (systemtap_session& s) // for now, just spawn stpd string stpd_cmd = string("/usr/bin/sudo ") + string(PKGLIBDIR) + "/stpd " - + "-r " // disable relayfs + + (s.bulk_mode ? "" : "-r ") + (s.verbose ? "" : "-q "); if (s.cmd != "") @@ -156,6 +156,9 @@ run_pass (systemtap_session& s) if (s.target_pid) stpd_cmd += "-t " + stringify(s.target_pid) + " "; + if (s.buffer_size) + stpd_cmd += "-b " + stringify(s.buffer_size) + " "; + stpd_cmd += s.tmpdir + "/" + s.module_name + ".ko"; if (s.verbose) clog << "Running " << stpd_cmd << endl; diff --git a/elaborate.h b/elaborate.h index 22fea82f..e3683a27 100644 --- a/elaborate.h +++ b/elaborate.h @@ -214,6 +214,8 @@ struct systemtap_session bool verbose; bool keep_tmpdir; bool guru_mode; + bool bulk_mode; + int buffer_size; // temporary directory for module builds etc. // hazardous - it is "rm -rf"'d at exit @@ -61,6 +61,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 << " -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"; @@ -116,6 +118,8 @@ main (int argc, char * const argv []) s.verbose = false; s.test_mode = false; s.guru_mode = false; + s.bulk_mode = false; + s.buffer_size = 0; s.last_pass = 5; s.module_name = "stap_" + stringify(getpid()); s.keep_tmpdir = false; @@ -136,7 +140,7 @@ main (int argc, char * const argv []) while (true) { - int grc = getopt (argc, argv, "hVvp:I:e:o:tR:r:m:kgc:x:D:"); + int grc = getopt (argc, argv, "hVvp:I:e:o:tR:r:m:kgc:x:D:bs:"); if (grc < 0) break; switch (grc) @@ -197,6 +201,20 @@ main (int argc, char * const argv []) s.guru_mode = true; break; + case 'b': + s.bulk_mode = true; + s.macros.push_back (string ("STP_RELAYFS")); + break; + + case 's': + s.buffer_size = atoi (optarg); + if (s.buffer_size < 1 || s.buffer_size > 64) + { + cerr << "Invalid buffer size." << endl; + usage (s); + } + break; + case 'c': s.cmd = string (optarg); break; diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index a604c568..1c94b0e4 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,8 @@ +2005-10-05 Tom Zanussi <zanussi@us.ibm.com> + + * transport.c (_stp_transport_open): Add kbug message. + * transport.h: Change default n_subbufs to 16. + 2005-09-08 Martin Hunt <hunt@redhat.com> * procfs.c (_stp_register_procfs): Change ifdefs to eliminate diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index fdd91078..e8d2112d 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -175,7 +175,7 @@ void _stp_transport_close() int _stp_transport_open(struct transport_info *info) { - kbug ("stp_transport_open: %d byte buffer. target=%d\n", info->buf_size, info->target); + kbug ("stp_transport_open: %d Mb buffer. target=%d\n", info->buf_size, info->target); info->transport_mode = _stp_transport_mode; kbug("transport_mode=%d\n", info->transport_mode); @@ -196,6 +196,8 @@ int _stp_transport_open(struct transport_info *info) _stp_unregister_procfs(); return -ENOMEM; } + kbug ("stp_transport_open: %u Mb buffers, subbuf_size=%u, n_subbufs=%u\n", + info->buf_size, subbuf_size, n_subbufs); } else #endif { diff --git a/runtime/transport/transport.h b/runtime/transport/transport.h index 78221c39..e5e087a2 100644 --- a/runtime/transport/transport.h +++ b/runtime/transport/transport.h @@ -13,7 +13,7 @@ void _stp_warn (const char *fmt, ...); #define STP_BUFFER_SIZE 8192 #ifdef STP_RELAYFS -static unsigned n_subbufs = 4; +static unsigned n_subbufs = 16; static unsigned subbuf_size = 65536; #define _stp_transport_write(data, len) _stp_relay_write(data, len) static int _stp_transport_mode = STP_TRANSPORT_RELAYFS; |