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/perf.c | |
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/perf.c')
-rw-r--r-- | runtime/perf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/perf.c b/runtime/perf.c index 0b812630..9ac8b481 100644 --- a/runtime/perf.c +++ b/runtime/perf.c @@ -59,7 +59,7 @@ static struct pfarg_start start_args; * @param pmd_count, number of entries in pmd * @returns an int, 0 if no errors encountered during setup */ -int _stp_perfmon_setup(void **desc, +static int _stp_perfmon_setup(void **desc, struct pfarg_ctx *context, struct pfarg_pmc pmc[], int pmc_count, struct pfarg_pmd pmd[], int pmd_count) @@ -98,7 +98,7 @@ cleanup: *desc=NULL; * @param desc unique pointer to describe configuration * @returns an int, 0 if no errors encountered during shutdown */ -int _stp_perfmon_shutdown(void *desc) +static int _stp_perfmon_shutdown(void *desc) { int err=0; @@ -116,7 +116,7 @@ int _stp_perfmon_shutdown(void *desc) * @param desc unique pointer to describe configuration * @returns an int64, raw value of counter */ -int64_t _stp_perfmon_read(void *desc, int counter) +static int64_t _stp_perfmon_read(void *desc, int counter) { struct pfarg_pmd storage; |