summaryrefslogtreecommitdiffstats
path: root/runtime/transport/utt.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/transport/utt.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/transport/utt.c')
-rw-r--r--runtime/transport/utt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/transport/utt.c b/runtime/transport/utt.c
index 21d2ab8a..59060474 100644
--- a/runtime/transport/utt.c
+++ b/runtime/transport/utt.c
@@ -37,7 +37,7 @@ static int utt_overwrite_flag = 0;
*
* Most of this function is deadcopy of relay_switch_subbuf.
*/
-size_t utt_switch_subbuf(struct utt_trace *utt, struct rchan_buf *buf,
+static size_t utt_switch_subbuf(struct utt_trace *utt, struct rchan_buf *buf,
size_t length)
{
char *old, *new;
@@ -122,7 +122,7 @@ static void __utt_timer_init(struct utt_trace * utt)
add_timer(&utt->timer);
}
-void utt_set_overwrite(int overwrite)
+static void utt_set_overwrite(int overwrite)
{
utt_overwrite_flag = overwrite;
}
@@ -170,7 +170,7 @@ err:
}
-void utt_trace_cleanup(struct utt_trace *utt)
+static void utt_trace_cleanup(struct utt_trace *utt)
{
if (utt == NULL)
return;
@@ -182,7 +182,7 @@ void utt_trace_cleanup(struct utt_trace *utt)
_stp_kfree(utt);
}
-int utt_trace_remove(struct utt_trace *utt)
+static int utt_trace_remove(struct utt_trace *utt)
{
if (utt->trace_state == Utt_trace_setup ||
utt->trace_state == Utt_trace_stopped)
@@ -288,7 +288,7 @@ static struct rchan_callbacks utt_relay_callbacks_global = {
/*
* Setup everything required to start tracing
*/
-struct utt_trace *utt_trace_setup(struct utt_trace_setup *utts)
+static struct utt_trace *utt_trace_setup(struct utt_trace_setup *utts)
{
struct utt_trace *utt = NULL;
struct dentry *dir = NULL;
@@ -373,7 +373,7 @@ err:
return NULL;
}
-int utt_trace_startstop(struct utt_trace *utt, int start,
+static int utt_trace_startstop(struct utt_trace *utt, int start,
unsigned int *trace_seq)
{
int ret;