summaryrefslogtreecommitdiffstats
path: root/runtime/regs.c
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/regs.c
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/regs.c')
-rw-r--r--runtime/regs.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/runtime/regs.c b/runtime/regs.c
index 81b865b1..2f7c741d 100644
--- a/runtime/regs.c
+++ b/runtime/regs.c
@@ -31,7 +31,7 @@
* @note i386 and x86_64 only so far.
*/
-unsigned long _stp_ret_addr (struct pt_regs *regs)
+static unsigned long _stp_ret_addr (struct pt_regs *regs)
{
#if defined (STAPCONF_X86_UNIREGS) && (defined (__x86_64__) || defined (__i386__))
unsigned long *ra = (unsigned long *)regs->sp;
@@ -85,7 +85,7 @@ unsigned long _stp_ret_addr (struct pt_regs *regs)
#if defined (STAPCONF_X86_UNIREGS) && defined (__x86_64__)
-void _stp_print_regs(struct pt_regs * regs)
+static void _stp_print_regs(struct pt_regs * regs)
{
unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs;
unsigned int fsindex,gsindex;
@@ -126,7 +126,7 @@ void _stp_print_regs(struct pt_regs * regs)
#elif defined (STAPCONF_X86_UNIREGS) && defined (__i386__)
-void _stp_print_regs(struct pt_regs * regs)
+static void _stp_print_regs(struct pt_regs * regs)
{
unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L;
@@ -153,7 +153,7 @@ void _stp_print_regs(struct pt_regs * regs)
}
#elif defined (__x86_64__)
-void _stp_print_regs(struct pt_regs * regs)
+static void _stp_print_regs(struct pt_regs * regs)
{
unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs;
unsigned int fsindex,gsindex;
@@ -193,7 +193,7 @@ void _stp_print_regs(struct pt_regs * regs)
}
#elif defined (__ia64__)
-void _stp_print_regs(struct pt_regs * regs)
+static void _stp_print_regs(struct pt_regs * regs)
{
unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri;
@@ -228,7 +228,7 @@ void _stp_print_regs(struct pt_regs * regs)
* @param regs The pt_regs saved by the kprobe.
* @note i386 and x86_64 only so far.
*/
-void _stp_print_regs(struct pt_regs * regs)
+static void _stp_print_regs(struct pt_regs * regs)
{
unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L;
@@ -263,7 +263,7 @@ static int _stp_probing_32bit_app(struct pt_regs *regs)
return (user_mode(regs) && test_tsk_thread_flag(current, TIF_32BIT));
}
-void _stp_print_regs(struct pt_regs * regs)
+static void _stp_print_regs(struct pt_regs * regs)
{
int i;
@@ -302,7 +302,7 @@ static const char *processor_modes[]=
};
-void _stp_print_regs(struct pt_regs * regs)
+static void _stp_print_regs(struct pt_regs * regs)
{
unsigned long flags = condition_codes(regs);
@@ -365,7 +365,7 @@ void _stp_print_regs(struct pt_regs * regs)
#define GPRSIZE "%08lX "
#endif
-void _stp_print_regs(struct pt_regs * regs)
+static void _stp_print_regs(struct pt_regs * regs)
{
char *mode;
int i;