lkml.org 
[lkml]   [2007]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH][RFC] kprobes: Add user entry-handler in kretprobes
From
Date
On Thu, 2007-11-15 at 20:30 +0530, Abhishek Sagar wrote:
> On Nov 15, 2007 4:21 AM, Jim Keniston <jkenisto@us.ibm.com> wrote:
> > 2. Simplify the task of correlating data (e.g., timestamps) between
> > function entry and function return.
>
> Would adding of data and len fields in ri help? Instead of "pouching"
> data in one go at registration time, this would let user handlers do
> the allocation

Yes and no. Adding just a data field -- void*, or maybe unsigned long
long so it's big enought to accommodate big timestamps -- would be a big
improvement on your current proposal. That would save the user the
drudgery of mapping the ri pointer to his/her per-instance data.
There's plenty of precedent for passing "private_data" values to
callbacks.

I don't think a len field would help much. If such info were needed, it
could be stored in the data structure pointed to by the data field.

I still don't think "letting [i.e., requiring that] user handlers do the
allocation" is a win. I'm still interested to see how this plays out in
real examples.

> and allow them to use different kinds of data
> structures per-instance.

I haven't been able to think of any scenarios where this would be
useful. A "data pouch" could always contain a union, FWIW.

>
> - Abhishek Sagar

Jim


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-16 00:09    [W:0.088 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site