diff options
Diffstat (limited to 'runtime/transport')
-rw-r--r-- | runtime/transport/control.c | 2 | ||||
-rw-r--r-- | runtime/transport/relayfs.c | 8 | ||||
-rw-r--r-- | runtime/transport/relayfs.h | 4 | ||||
-rw-r--r-- | runtime/transport/symbols.c | 2 | ||||
-rw-r--r-- | runtime/transport/transport.c | 16 | ||||
-rw-r--r-- | runtime/transport/transport.h | 20 | ||||
-rw-r--r-- | runtime/transport/utt.c | 12 | ||||
-rw-r--r-- | runtime/transport/utt.h | 10 |
8 files changed, 37 insertions, 37 deletions
diff --git a/runtime/transport/control.c b/runtime/transport/control.c index 7d78cca4..93db97e1 100644 --- a/runtime/transport/control.c +++ b/runtime/transport/control.c @@ -14,7 +14,7 @@ static int _stp_current_buffers = STP_DEFAULT_BUFFERS; static _stp_mempool_t *_stp_pool_q; static struct list_head _stp_ctl_ready_q; -DEFINE_SPINLOCK(_stp_ctl_ready_lock); +static DEFINE_SPINLOCK(_stp_ctl_ready_lock); static ssize_t _stp_ctl_write_cmd(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { diff --git a/runtime/transport/relayfs.c b/runtime/transport/relayfs.c index 6c516d66..5bd3ff4d 100644 --- a/runtime/transport/relayfs.c +++ b/runtime/transport/relayfs.c @@ -77,7 +77,7 @@ static void _stp_remove_relay_root(struct dentry *root) } } -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; int i; @@ -122,13 +122,13 @@ err: return NULL; } -void utt_set_overwrite(int overwrite) +static void utt_set_overwrite(int overwrite) { if (_stp_utt) _stp_utt->rchan->overwrite = overwrite; } -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; @@ -163,7 +163,7 @@ int utt_trace_startstop(struct utt_trace *utt, int start, } -int utt_trace_remove(struct utt_trace *utt) +static int utt_trace_remove(struct utt_trace *utt) { dbug_trans(1, "removing relayfs files. %d\n", utt->trace_state); if (utt && (utt->trace_state == Utt_trace_setup || utt->trace_state == Utt_trace_stopped)) { diff --git a/runtime/transport/relayfs.h b/runtime/transport/relayfs.h index c47f4b98..c33e9b08 100644 --- a/runtime/transport/relayfs.h +++ b/runtime/transport/relayfs.h @@ -16,11 +16,11 @@ # include <linux/namei.h> -struct rchan *_stp_relayfs_open(unsigned n_subbufs, +static struct rchan *_stp_relayfs_open(unsigned n_subbufs, unsigned subbuf_size, int pid, struct dentry **outdir); -void _stp_relayfs_close(struct rchan *chan, struct dentry *dir); +static void _stp_relayfs_close(struct rchan *chan, struct dentry *dir); #endif /* _TRANSPORT_RELAYFS_H_ */ diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index 72f9ad80..b9458ada 100644 --- a/runtime/transport/symbols.c +++ b/runtime/transport/symbols.c @@ -103,7 +103,7 @@ static void generic_swap(void *a, void *b, int size) * O(n*n) worst-case behavior and extra memory requirements that make * it less suitable for kernel use. */ -void _stp_sort(void *_base, size_t num, size_t size, +static void _stp_sort(void *_base, size_t num, size_t size, int (*cmp_func) (const void *, const void *), void (*swap_func) (void *, void *, int size)) { char *base = (char*) _base; diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index f5ee2c36..a572ef9c 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -25,9 +25,9 @@ static struct utt_trace *_stp_utt = NULL; static unsigned int utt_seq = 1; static int _stp_probes_started = 0; -pid_t _stp_target = 0; +static pid_t _stp_target = 0; static int _stp_exit_called = 0; -int _stp_exit_flag = 0; +static int _stp_exit_flag = 0; #ifdef STP_OLD_TRANSPORT #include "relayfs.c" #include "procfs.c" @@ -42,9 +42,9 @@ module_param(_stp_bufsize, int, 0); MODULE_PARM_DESC(_stp_bufsize, "buffer size"); /* forward declarations */ -void probe_exit(void); -int probe_start(void); -void _stp_exit(void); +static void probe_exit(void); +static int probe_start(void); +static void _stp_exit(void); /* check for new workqueue API */ #ifdef DECLARE_DELAYED_WORK @@ -61,7 +61,7 @@ static struct workqueue_struct *_stp_wq; * _stp_handle_start - handle STP_START */ -void _stp_handle_start(struct _stp_msg_start *st) +static void _stp_handle_start(struct _stp_msg_start *st) { dbug_trans(1, "stp_handle_start\n"); _stp_target = st->target; @@ -170,7 +170,7 @@ static void _stp_work_queue(void *data) * This is called automatically when the module is unloaded. * */ -void _stp_transport_close() +static void _stp_transport_close() { dbug_trans(1, "%d: ************** transport_close *************\n", current->pid); _stp_cleanup_and_exit(0); @@ -205,7 +205,7 @@ static struct utt_trace *_stp_utt_open(void) * _stp_transport_init() is called from the module initialization. * It does the bare minimum to exchange commands with staprun */ -int _stp_transport_init(void) +static int _stp_transport_init(void) { int ret; diff --git a/runtime/transport/transport.h b/runtime/transport/transport.h index 421a65c2..11a070de 100644 --- a/runtime/transport/transport.h +++ b/runtime/transport/transport.h @@ -26,20 +26,20 @@ static unsigned _stp_nsubbufs = 8; static unsigned _stp_subbuf_size = 65536*4; -void _stp_warn (const char *fmt, ...); -extern void _stp_transport_close(void); -extern int _stp_print_init(void); -extern void _stp_print_cleanup(void); +static void _stp_warn (const char *fmt, ...); +static void _stp_transport_close(void); +static int _stp_print_init(void); +static void _stp_print_cleanup(void); static struct dentry *_stp_get_root_dir(const char *name); static int _stp_lock_debugfs(void); static void _stp_unlock_debugfs(void); static void _stp_attach(void); static void _stp_detach(void); -void _stp_handle_start(struct _stp_msg_start *st); +static void _stp_handle_start(struct _stp_msg_start *st); -int _stp_pid = 0; -uid_t _stp_uid = 0; -gid_t _stp_gid = 0; -pid_t _stp_init_pid = 0; -int _stp_attached = 0; +static int _stp_pid = 0; +static uid_t _stp_uid = 0; +static gid_t _stp_gid = 0; +static pid_t _stp_init_pid = 0; +static int _stp_attached = 0; #endif /* _TRANSPORT_TRANSPORT_H_ */ 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; diff --git a/runtime/transport/utt.h b/runtime/transport/utt.h index df225b3c..40e54919 100644 --- a/runtime/transport/utt.h +++ b/runtime/transport/utt.h @@ -40,14 +40,14 @@ struct utt_trace_setup { }; -extern struct utt_trace *utt_trace_setup(struct utt_trace_setup *utts); -extern int utt_trace_startstop(struct utt_trace *utt, int start, +static struct utt_trace *utt_trace_setup(struct utt_trace_setup *utts); +static int utt_trace_startstop(struct utt_trace *utt, int start, unsigned int *trace_seq); -extern void utt_trace_cleanup(struct utt_trace *utt); -extern int utt_trace_remove(struct utt_trace *utt); +static void utt_trace_cleanup(struct utt_trace *utt); +static int utt_trace_remove(struct utt_trace *utt); #ifndef STP_OLD_TRANSPORT -extern 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); /** * utt_reserve - reserve slot in channel buffer |