From 4c2732a1dad1de295c9219ee3afac007b2d7ba05 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 28 Jan 2009 14:36:08 -0800 Subject: 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. --- runtime/copy.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'runtime/copy.c') diff --git a/runtime/copy.c b/runtime/copy.c index 6bb22762..4fb87253 100644 --- a/runtime/copy.c +++ b/runtime/copy.c @@ -47,8 +47,7 @@ }) -long _stp_strncpy_from_user(char *dst, const char __user *src, long count); -//static long __stp_strncpy_from_user(char *dst, const char __user *src, long count); +static long __stp_strncpy_from_user(char *dst, const char __user *src, long count); #if defined (__i386__) #define __stp_strncpy_from_user(dst,src,count,res) \ @@ -131,7 +130,7 @@ do { \ * count bytes and returns count. */ -long _stp_strncpy_from_user(char *dst, const char __user *src, long count) +static long _stp_strncpy_from_user(char *dst, const char __user *src, long count) { long res = -EFAULT; if (access_ok(VERIFY_READ, src, count)) @@ -152,7 +151,7 @@ long _stp_strncpy_from_user(char *dst, const char __user *src, long count) * */ -unsigned long _stp_copy_from_user(char *dst, const char __user *src, unsigned long count) +static unsigned long _stp_copy_from_user(char *dst, const char __user *src, unsigned long count) { if (count) { if (access_ok(VERIFY_READ, src, count)) -- cgit