From: Frederik Deweerdt <deweerdt@free.fr>
To: Srinivasa Ds <srinivasa@in.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-kernel@vger.kernel.org, akpm@osdl.org, torvalds@osdl.org,
jkenisto@us.ibm.com, anil.s.keshavamurthy@intel.com,
prasanna@in.ibm.com, ananth@in.ibm.com
Subject: Re: [RFC] [PATCH] To list all active probes in the system
Date: Tue, 6 Feb 2007 14:56:09 +0000 [thread overview]
Message-ID: <20070206145609.GA11249@slug> (raw)
In-Reply-To: <45C894EA.4060305@in.ibm.com>
Hi,
Comments below,
On Tue, Feb 06, 2007 at 08:17:06PM +0530, Srinivasa Ds wrote:
> Srinivasa Ds wrote:
> > Christoph Hellwig wrote:
> >> On Tue, Feb 06, 2007 at 03:25:35PM +0530, Srinivasa Ds wrote:
> >>> Hi folks
> >>>
> >>> I have developed a patch, that lists all active probes in the
> >>> system. I have done this through /proc interface. Currently list is
> >>> available under /proc/kprobes/list. Any suggestions for better place and
> >>> name??
> >> /debug/kprobes/list? :)
> >>
> > Good Idea, I will update my patch to use debugfs.
> Patch that uses debugfs.
>
> Signed-off-by: Srinivasa DS <srinivasa@in.ibm.com>
>
>
>
>
>
> fs/debugfs/inode.c | 4 ++
> include/linux/kprobes.h | 4 ++
> kernel/kprobes.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 100 insertions(+)
>
> Index: linux-2.6.20/fs/debugfs/inode.c
> ===================================================================
> --- linux-2.6.20.orig/fs/debugfs/inode.c
> +++ linux-2.6.20/fs/debugfs/inode.c
> @@ -25,6 +25,7 @@
> #include <linux/namei.h>
> #include <linux/debugfs.h>
> #include <linux/fsnotify.h>
> +#include <linux/kprobes.h>
>
> #define DEBUGFS_MAGIC 0x64626720
>
> @@ -320,6 +321,9 @@ static int __init debugfs_init(void)
> retval = register_filesystem(&debug_fs_type);
> if (retval)
> subsystem_unregister(&debug_subsys);
> +#ifdef CONFIG_KPROBES
> + debugfs_kprobe_init();
> +#endif
The ifdef here could be skipped if ....
> return retval;
> }
>
[... snip ...]
> Index: linux-2.6.20/include/linux/kprobes.h
> ===================================================================
> --- linux-2.6.20.orig/include/linux/kprobes.h
> +++ linux-2.6.20/include/linux/kprobes.h
> @@ -203,6 +203,7 @@ struct kretprobe_instance *get_free_rp_i
> void add_rp_inst(struct kretprobe_instance *ri);
> void kprobe_flush_task(struct task_struct *tk);
> void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head);
> +void debugfs_kprobe_init(void);
> #else /* CONFIG_KPROBES */
>
> #define __kprobes /**/
> @@ -240,5 +241,8 @@ static inline void unregister_kretprobe(
> static inline void kprobe_flush_task(struct task_struct *tk)
> {
> }
> +static inline void proc_kprobe_init(void)
> +{
> +}
... this was renamed to debugfs_kprobe_init() instead -which was your
first intention I suppose ;)-
Regards,
Frederik
next prev parent reply other threads:[~2007-02-06 14:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-06 9:55 [RFC] [PATCH] To list all active probes in the system Srinivasa Ds
2007-02-06 10:06 ` Christoph Hellwig
2007-02-06 10:22 ` Srinivasa Ds
2007-02-06 14:47 ` Srinivasa Ds
2007-02-06 14:56 ` Frederik Deweerdt [this message]
2007-02-07 5:25 ` Srinivasa Ds
2007-02-07 22:27 ` Andrew Morton
2007-02-08 11:46 ` [RFC] [PATCH] To list all active probes in the system---Take-2 Srinivasa Ds
2007-02-09 8:03 ` Andrew Morton
2007-02-12 8:45 ` Andrew Morton
2007-02-12 9:29 ` Ananth N Mavinakayanahalli
2007-02-06 10:13 ` [RFC] [PATCH] To list all active probes in the system Andrew Morton
2007-02-06 10:21 ` Srinivasa Ds
2007-02-06 20:36 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070206145609.GA11249@slug \
--to=deweerdt@free.fr \
--cc=akpm@osdl.org \
--cc=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=hch@infradead.org \
--cc=jkenisto@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=prasanna@in.ibm.com \
--cc=srinivasa@in.ibm.com \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.