[PATCH] Create a function that indents without the tid()

Frank Ch. Eigler fche@redhat.com
Wed Sep 30 21:00:00 GMT 2009


Hi -

On Wed, Sep 30, 2009 at 05:55:01PM -0300, Breno Leitao wrote:

> [...]  The only problem I see now, is that it will display the
> scheduled process [...]

How about generalizing _generic_indent to also take the 
execname()/tid() as incoming parameters:

function _generic_indent (idx, desc, delta) { 
 ...
  r = sprintf("%6d %s:", (ts - _indent_timestamps[idx]), desc)
 ...
}

function thread_indent (delta) 
{
  return _generic_indent (tid(), sprintf("%s(%d)", execname(), tid()), delta)  
}

function indent (delta) 
{
  return _generic_indent (-1, "", delta)  
}

- FChE



More information about the Systemtap mailing list