summaryrefslogtreecommitdiffstats
path: root/runtime/procfs.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/procfs.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/procfs.c')
-rw-r--r--runtime/procfs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/procfs.c b/runtime/procfs.c
index 0fe22aba..98d0af98 100644
--- a/runtime/procfs.c
+++ b/runtime/procfs.c
@@ -22,7 +22,7 @@ static struct proc_dir_entry *_stp_procfs_files[STP_MAX_PROCFS_FILES];
static struct proc_dir_entry *_stp_proc_stap = NULL;
static struct proc_dir_entry *_stp_proc_root = NULL;
-void _stp_close_procfs(void);
+static void _stp_close_procfs(void);
// 2.6.24 fixed proc_dir_entry refcounting.
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
@@ -34,7 +34,7 @@ void _stp_close_procfs(void);
/*
* Removes /proc/systemtap/{module_name} and /proc/systemtap (if empty)
*/
-void _stp_rmdir_proc_module(void)
+static void _stp_rmdir_proc_module(void)
{
if (_stp_proc_root && _stp_proc_root->subdir == NULL) {
if (atomic_read(&_stp_proc_root->count) != LAST_ENTRY_COUNT)
@@ -71,7 +71,7 @@ void _stp_rmdir_proc_module(void)
* Safely creates /proc/systemtap (if necessary) and
* /proc/systemtap/{module_name}.
*/
-int _stp_mkdir_proc_module(void)
+static int _stp_mkdir_proc_module(void)
{
if (_stp_proc_root == NULL) {
struct nameidata nd;
@@ -128,7 +128,7 @@ static struct proc_dir_entry *_stp_procfs_lookup(const char *dir, struct proc_di
return NULL;
}
-int _stp_create_procfs(const char *path, int num)
+static int _stp_create_procfs(const char *path, int num)
{
const char *p;
char *next;
@@ -195,7 +195,7 @@ err:
return -1;
}
-void _stp_close_procfs(void)
+static void _stp_close_procfs(void)
{
int i;
for (i = _stp_num_pde-1; i >= 0; i--) {