This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC 1/3] Kprobes: userspace probes new interfaces
Hi James,
On Wed, Sep 14, 2005 at 11:10:40AM -0500, James Dickens wrote:
> > struct uprobe {
> > /*path of the application */
> > char name[50];
>
>
> this doesn't scale, should be a pointer to a list of applications being probed.
Now with having kernel module allocate this application pathname string
and copying the path name to application pathname string should work.
With this change, the uprobes structure will look like
struct uprobe {
char *pathname;
...............
With this, the kernel module need to allocate pathname string one for each
application and pass the pointer of the same pathname to insert probes within
that application. This should help to scale well.
>
> 450000 * 50 = 22.5 MB.. far too much for kernel space before we even
> do any work.
>
Now it will just the stringlength size of memory need to be allocated
for all the probes (say 450000) probes within the same application.
As per your example, now you will have
strlen(application_path) + (450000 * sizeof(char *)) = 1.8 MB.
Thanks
Prasanna
--
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Ph: 91-80-25044636
<prasanna@in.ibm.com>