diff options
author | Josh Stone <jistone@redhat.com> | 2009-01-28 14:36:08 -0800 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-01-28 17:16:50 -0800 |
commit | 4c2732a1dad1de295c9219ee3afac007b2d7ba05 (patch) | |
tree | fb84977ad73f62ce57a147e9c3d6bf869376737c /runtime/runtime.h | |
parent | 83e08fc5458e8196d5f0ed5790f9f7de77a80bb6 (diff) | |
download | systemtap-steved-4c2732a1dad1de295c9219ee3afac007b2d7ba05.tar.gz systemtap-steved-4c2732a1dad1de295c9219ee3afac007b2d7ba05.tar.xz systemtap-steved-4c2732a1dad1de295c9219ee3afac007b2d7ba05.zip |
Use 'static' as much as possible
This change just inserts 'static' on runtime, tapset, and generated C
functions and globals, so the compiler can do a better job of
optimizing.
My tests with small scripts show ~10% reduction in compile time and ~20%
reduction in module size. Larger scripts may show less benefit, but I
expect purely positive results.
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r-- | runtime/runtime.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h index 3b3e117d..fc5d454f 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -44,7 +44,7 @@ #endif static void _stp_dbug (const char *func, int line, const char *fmt, ...); -void _stp_error (const char *fmt, ...); +static void _stp_error (const char *fmt, ...); #include "debug.h" @@ -93,7 +93,7 @@ static struct #include "addr-map.c" /* Support functions for int64_t module parameters. */ -int param_set_int64_t(const char *val, struct kernel_param *kp) +static int param_set_int64_t(const char *val, struct kernel_param *kp) { char *endp; long long ll; @@ -114,7 +114,7 @@ int param_set_int64_t(const char *val, struct kernel_param *kp) return 0; } -int param_get_int64_t(char *buffer, struct kernel_param *kp) +static int param_get_int64_t(char *buffer, struct kernel_param *kp) { return sprintf(buffer, "%lli", (long long)*((int64_t *)kp->arg)); } @@ -129,7 +129,7 @@ int init_module (void) return _stp_transport_init(); } -int probe_start(void); +static int probe_start(void); void cleanup_module(void) { |