This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Kprobes: move aggregate probe handlers and few return probe routines to static


Hi,

This patch moves kprobes aggregate probe handlers and few return probe routines
to static.

Thanks
Prasanna

Several aggregate kprobe handlers and return probe routines were unnecessarily
made global. This patch moves several global routines to static.

Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>


---

 linux-2.6.12-rc6-mm1-prasanna/kernel/kprobes.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff -puN kernel/kprobes.c~move-aggr-kprobe-handlers-to-static kernel/kprobes.c
--- linux-2.6.12-rc6-mm1/kernel/kprobes.c~move-aggr-kprobe-handlers-to-static	2005-06-08 15:14:52.000000000 +0530
+++ linux-2.6.12-rc6-mm1-prasanna/kernel/kprobes.c	2005-06-08 15:24:21.000000000 +0530
@@ -82,7 +82,7 @@ struct kprobe *get_kprobe(void *addr)
  * Aggregate handlers for multiple kprobes support - these handlers
  * take care of invoking the individual kprobe handlers on p->list
  */
-int aggr_pre_handler(struct kprobe *p, struct pt_regs *regs)
+static int aggr_pre_handler(struct kprobe *p, struct pt_regs *regs)
 {
 	struct kprobe *kp;
 
@@ -97,8 +97,8 @@ int aggr_pre_handler(struct kprobe *p, s
 	return 0;
 }
 
-void aggr_post_handler(struct kprobe *p, struct pt_regs *regs,
-		unsigned long flags)
+static void aggr_post_handler(struct kprobe *p, struct pt_regs *regs,
+			      unsigned long flags)
 {
 	struct kprobe *kp;
 
@@ -112,7 +112,8 @@ void aggr_post_handler(struct kprobe *p,
 	return;
 }
 
-int aggr_fault_handler(struct kprobe *p, struct pt_regs *regs, int trapnr)
+static int aggr_fault_handler(struct kprobe *p, struct pt_regs *regs,
+			      int trapnr)
 {
 	/*
 	 * if we faulted "during" the execution of a user specified
@@ -153,7 +154,7 @@ struct kretprobe_instance *get_free_rp_i
 	return NULL;
 }
 
-struct kretprobe_instance *get_used_rp_inst(struct kretprobe *rp)
+static struct kretprobe_instance *get_used_rp_inst(struct kretprobe *rp)
 {
 	struct hlist_node *node;
 	struct kretprobe_instance *ri;
@@ -252,7 +253,7 @@ void kprobe_flush_task(struct task_struc
  * This kprobe pre_handler is registered with every kretprobe. When probe
  * hits it will set up the return probe.
  */
-int pre_handler_kretprobe(struct kprobe *p, struct pt_regs *regs)
+static int pre_handler_kretprobe(struct kprobe *p, struct pt_regs *regs)
 {
 	struct kretprobe *rp = container_of(p, struct kretprobe, kp);
 
@@ -261,7 +262,7 @@ int pre_handler_kretprobe(struct kprobe 
 	return 0;
 }
 
-inline void free_rp_inst(struct kretprobe *rp)
+static inline void free_rp_inst(struct kretprobe *rp)
 {
 	struct kretprobe_instance *ri;
 	while ((ri = get_free_rp_inst(rp)) != NULL) {

_
-- 

Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Ph: 91-80-25044636
<prasanna@in.ibm.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]