summaryrefslogtreecommitdiffstats
path: root/runtime/copy.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/copy.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/copy.c')
-rw-r--r--runtime/copy.c7
1 files changed, 3 insertions, 4 deletions
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 { \
* <i>count</i> bytes and returns <i>count</i>.
*/
-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))