public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "jistone at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug tapsets/16472] long chain of nested function calls consumes a lot of empty whitespace due to thread_indent() function
Date: Tue, 18 Feb 2014 18:13:00 -0000	[thread overview]
Message-ID: <bug-16472-6586-sD3uVW6FoD@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-16472-6586@http.sourceware.org/bugzilla/>

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.

  parent reply	other threads:[~2014-02-18 18:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-20 20:31 [Bug tapsets/16472] New: " fahadaliarshad at gmail dot com
2014-02-18 14:19 ` [Bug tapsets/16472] " fahadaliarshad at gmail dot com
2014-02-18 18:13 ` jistone at redhat dot com [this message]
2014-02-19 18:52 ` jistone at redhat dot com
2014-02-19 19:29 ` fahadaliarshad at gmail dot com
2014-02-20  0:11 ` jistone at redhat dot com
2014-02-21 14:35 ` fahadaliarshad at gmail dot com
2014-02-26 14:41 ` fahadaliarshad at gmail dot com
2014-02-26 23:06 ` jistone at redhat dot com
2014-02-27  2:52 ` fahadaliarshad at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-16472-6586-sD3uVW6FoD@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).