lkml.org 
[lkml]   [2009]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH tracing/kprobes 4/7] tracing/kprobes: Add event profiling support
    On Mon, Sep 14, 2009 at 12:54:24PM -0400, Masami Hiramatsu wrote:
    >>> I'd like to have a dispatcher function and flags internally :)
    >>
    >>
    >> You mean kprobes that could support multiple probes?
    >> That would be a nice solution IMHO...
    >
    > Yeah, actually kprobes could support multiple probes on the
    > same point. But kprobe structure has many extensions which
    > kprobe-tracer doesn't need, e.g. post_handler/break_handler,
    > opcode, arch sprcific instructions.
    > Kretprobe consumes more memories for storing return points :(.
    >
    > Thus, if we know there are two functions to be called on the
    > same probe point, I think it is better to have a dispatcher.
    > (Especially, in this case, we can call fixed functions, so
    > it's easier way.)
    >


    Yeah, you could union the post_handler with profile_handler
    or something like that.

    It depends if kprobes may need one day to support an undeterminate
    number of probes.

    Also, is the post_handler called at the same location than the normal
    probe?
    And is a post handler called even if there is no normal handler?


    There might be some of such factors that would force you to handle a
    lot of corner cases, things that you wouldn't need to worry about
    if you just had to maintain a simple rcu list of probes to call.



    \
     
     \ /
      Last update: 2009-09-14 20:59    [W:4.073 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site