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]

[Bug tapsets/16472] long chain of nested function calls consumes a lot of empty whitespace due to thread_indent() function


https://sourceware.org/bugzilla/show_bug.cgi?id=16472

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jistone at redhat dot com

--- Comment #2 from Josh Stone <jistone at redhat dot com> ---
I think that only the nesting-depth is not enough.  This is thread-specific, so
it ought to have the same execname/tid identification as thread_indent().  The
tapset should be consistent with providing timestamps too.

So, I propose a new parameter flag to _generic_indent() to choose whether to
use the old indented style ("%-*s", x, "") or a new numeric style something
like ("[%d] ", x).  Then thread_indent_num() would look exactly like
thread_indent() except for choosing the new style, and we should also have an
indent_num() mirroring indent().

I renamed to _num because I suspect you may still want something that just
returns the depth.  If so, we can also factor out the _indent_counters[]
manipulation into something like _generic_indent_depth(idx, delta) returning
the number.  Then _generic_indent would call this, as would
thread_indent_depth() and indent_depth() to return numbers to the user.

Now I think my _num/_depth naming might be more confusing; let's think about
what to call them.  One version which prints the number instead of spacing,
with the same timestamp/execname/tid formatting, and another version which
returns the raw number for the caller to use as they please.

-- 
You are receiving this mail because:
You are the assignee for the bug.


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