diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2008-04-30 11:48:25 -0400 |
---|---|---|
committer | Masami Hiramatsu <mhiramat@redhat.com> | 2008-04-30 11:48:25 -0400 |
commit | 3b5ab982d758481ccd5003348391bea0b775d34b (patch) | |
tree | 020ab647762eea0dc683c8978a916323eccda784 | |
parent | ba6f838d2471c57fc3d8fc6d325766ff95ce108a (diff) | |
download | systemtap-steved-3b5ab982d758481ccd5003348391bea0b775d34b.tar.gz systemtap-steved-3b5ab982d758481ccd5003348391bea0b775d34b.tar.xz systemtap-steved-3b5ab982d758481ccd5003348391bea0b775d34b.zip |
PR5645: Fix sub-buffer size calculation and debug messages.
-rw-r--r-- | runtime/staprun/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/staprun/stapio.c | 2 | ||||
-rw-r--r-- | runtime/staprun/staprun.c | 2 | ||||
-rw-r--r-- | runtime/transport/ChangeLog | 6 | ||||
-rw-r--r-- | runtime/transport/transport.c | 6 |
5 files changed, 18 insertions, 3 deletions
diff --git a/runtime/staprun/ChangeLog b/runtime/staprun/ChangeLog index 9e0ccb73..2c09f8e2 100644 --- a/runtime/staprun/ChangeLog +++ b/runtime/staprun/ChangeLog @@ -1,3 +1,8 @@ +2008-04-30 Masami Hiramatsu <mhiramat@redhat.com> + + * stapio.c (main): Fix a typo in a debug message. + * staprun.c (main): Ditto. + 2008-04-24 Frank Ch. Eigler <fche@elastic.org> PR 6451. diff --git a/runtime/staprun/stapio.c b/runtime/staprun/stapio.c index b591244f..3c8c4f7f 100644 --- a/runtime/staprun/stapio.c +++ b/runtime/staprun/stapio.c @@ -30,7 +30,7 @@ int main(int argc, char **argv) parse_args(argc, argv); if (buffer_size) - dbug(1, "Using a buffer of %u bytes.\n", buffer_size); + dbug(1, "Using a buffer of %u MB.\n", buffer_size); if (optind < argc) { parse_modpath(argv[optind++]); diff --git a/runtime/staprun/staprun.c b/runtime/staprun/staprun.c index ee9bdc7b..0291d01f 100644 --- a/runtime/staprun/staprun.c +++ b/runtime/staprun/staprun.c @@ -230,7 +230,7 @@ int main(int argc, char **argv) parse_args(argc, argv); if (buffer_size) - dbug(2, "Using a buffer of %u bytes.\n", buffer_size); + dbug(2, "Using a buffer of %u MB.\n", buffer_size); if (optind < argc) { parse_modpath(argv[optind++]); diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index b0f2aee8..9d0ba162 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,9 @@ +2008-04-30 Masami Hiramatsu <mhiramat@redhat.com> + + PR 5645 + * transport.c (_stp_transport_init): Fix subbuffer size calculation + overflow. + 2008-04-21 hunt <hunt@redhat.com> * control.c (_stp_ctl_write): Return len + sizeof(int) so diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index 1f9a1667..a4e4e652 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -225,7 +225,11 @@ int _stp_transport_init(void) if (_stp_bufsize) { unsigned size = _stp_bufsize * 1024 * 1024; - _stp_subbuf_size = ((size >> 2) + 1) * 65536; + _stp_subbuf_size = 65536; + while (size / _stp_subbuf_size > 64 && + _stp_subbuf_size < 1024 * 1024) { + _stp_subbuf_size <<= 1; + } _stp_nsubbufs = size / _stp_subbuf_size; dbug_trans(1, "Using %d subbufs of size %d\n", _stp_nsubbufs, _stp_subbuf_size); } |