summaryrefslogtreecommitdiffstats
path: root/runtime/sym.h
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-01-28 14:36:08 -0800
committerJosh Stone <jistone@redhat.com>2009-01-28 17:16:50 -0800
commit4c2732a1dad1de295c9219ee3afac007b2d7ba05 (patch)
treefb84977ad73f62ce57a147e9c3d6bf869376737c /runtime/sym.h
parent83e08fc5458e8196d5f0ed5790f9f7de77a80bb6 (diff)
downloadsystemtap-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/sym.h')
-rw-r--r--runtime/sym.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/sym.h b/runtime/sym.h
index 9d6a4ded..e642cab4 100644
--- a/runtime/sym.h
+++ b/runtime/sym.h
@@ -54,15 +54,15 @@ struct _stp_module {
/* Defined by translator-generated stap-symbols.h. */
-struct _stp_module *_stp_modules [];
-unsigned _stp_num_modules;
+static struct _stp_module *_stp_modules [];
+static unsigned _stp_num_modules;
/* the number of modules in the arrays */
static unsigned long _stp_kretprobe_trampoline = 0;
-unsigned long _stp_module_relocate (const char *module, const char *section, unsigned long offset);
+static unsigned long _stp_module_relocate (const char *module, const char *section, unsigned long offset);
static struct _stp_module *_stp_get_unwind_info (unsigned long addr);
#endif /* _STP_SYM_H_ */