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]

Re: corrected: tapset/script information template


John Levon wrote:

On Fri, Apr 29, 2005 at 03:24:20PM -0400, William Cohen wrote:



* Associated files:

$dynamic_call_graph = 1; // turn on tracing of calls for thread
$dynamic_call_graph = 0; // turn off tracing of calls for thread



I'm probably missing something, but how is this supposed to work? I want to be able to get call graphs under certain circumstances. It's not very useful to only be able to say "always collect call graphs for this thread", I need to be able to say "if this happens, and we reach this function, then insert a stack trace into the tracing stream".

regards
john




Based on my discussion with Will yesterday our goal here is to support function tracing (Will correct me if i am wrong). The main thing we are trying to achieve here is let us say with other means you narrowed down the problem to sys_open function now you want to know what are all the functions sys_open calls. User could then write a script like the following


probe.kernel.sys_open.entry()
{
  $dynamic_call_graph =1;
}

What you would see in the output would be something of this kind
call sys_open
    call getname
         call do_getname
          return do_getname
    return getname
    call get_unused_fd
        call find_next_zero_bit
        return find_next_zero_bit
    return get_unused_fd
    call filep_open
    return filep_open
      .....
return sys_open

The above probe could be customized to a particular process as well, like in the following
probe.kernel.sys_open.entry()
{
if ($PID == 1234)
$dynamic_call_graph =1;
}


Does this give you better idea of what it is supposed to do and will it meet your need?

bye,
Vara Prasad


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