This is the mail archive of the systemtap@sourceware.org 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: [PATCH] Create a function that indents without the tid()


Breno Leitao <leitao@linux.vnet.ibm.com> writes:

> Actually indent_thread() is a very useful function, but
> sometimes you're probing something that is not related to
> thread, as an interrupt function, and if the application 
> changes during the interrupt, the indentation gets confused.
> [...]

It gets a bit confusing to read, but it is correct in several senses.
(I wonder what ftrace pretty-printed function traces with SMP look
like.)

> [...]
> So, I decided to create a simpler function that doesn't
> consider the thread.

> +function indent(delta){
> +  _indent += delta
> +  for (i=1; i<_indent; i++) r .= " "
> +  return r
> +}

Perhaps, but why not just

function indent(delta) { return _generic_indent(0, delta) }

?

- FChE


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