From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2349 invoked by alias); 18 Feb 2014 18:13:05 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 2258 invoked by uid 48); 18 Feb 2014 18:13:00 -0000 From: "jistone at redhat dot com" 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 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: tapsets X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: jistone at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q1/txt/msg00117.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16472 Josh Stone changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jistone at redhat dot com --- Comment #2 from Josh Stone --- 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.