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

Breno Leitao leitao@linux.vnet.ibm.com
Wed Sep 30 20:55:00 GMT 2009


Frank Ch. Eigler wrote:
> Breno Leitao <leitao@linux.vnet.ibm.com> writes:
> 
>> [...]
>>> function indent(delta) { return _generic_indent(0, delta) }
> 
>> Well, it makes sense, and it was my first implementation, but later I found that
>> tid() can be 0, and then the space counter (_indent_counters[idx]) will be 
>> corrupted when running indent() and thread_indent() together. [...]
> 
> Well, ok, how about { return _generic_indent(-1, delta) } ?
Nice. It works. Silly me, I didn't think about negative indexes.

The only problem I see now, is that it will display the scheduled process, and
since the process names have different lengths, the alignment will be lost and 
 sometimes it's difficult to follow/read, as an example I just got.

534776 a.out(6928):    -> neo_set_no_input_flow_control
535094 swapper(0):     <- neo_parse_modem
535357 a.out(6928):    <- neo_set_no_input_flow_control

So, if this is not important, I can submit a new patch with the implementation as 
you just described.

Thanks



More information about the Systemtap mailing list