public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Align correctly even stray items
@ 2008-06-20 12:17 pmachata
  0 siblings, 0 replies; only message in thread
From: pmachata @ 2008-06-20 12:17 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  0f35edb5f6c7423f39c875d47182ff3708419e7d (commit)
      from  ba8ffe9b1b7d9c253c93b958a7d8202c4addfa5e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 0f35edb5f6c7423f39c875d47182ff3708419e7d
Author: Petr Machata <pmachata@redhat.com>
Date:   Fri Jun 20 14:16:36 2008 +0200

    Align correctly even stray items

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/ftrace/Reporter.java |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/ftrace/Reporter.java b/frysk-core/frysk/ftrace/Reporter.java
index 6233c3f..876fc77 100644
--- a/frysk-core/frysk/ftrace/Reporter.java
+++ b/frysk-core/frysk/ftrace/Reporter.java
@@ -158,10 +158,16 @@ class Reporter
     public void eventLeave(Task task, Object item, String eventType,
 			    String eventName, Object retVal)
     {
+	String stray = "";
+
 	ArrayList tokens = getTokens(task);
-	int i = tokens.size();
-	while (tokens.remove(--i) != item) {
-	}
+	int i = tokens.size() - 1;
+	while (i >= 0 && tokens.get(i) != item)
+	    --i;
+	if (i < 0)
+	    stray = "stray ";
+	else
+	    tokens.subList(i, tokens.size()).clear();
 
 	if (!myLineOpened(task, item)) {
 	    if (lineOpened())
@@ -169,7 +175,7 @@ class Reporter
 	    String spaces = ArchFormatter.repeat(' ', tokens.size());
 	    writer.print(pidInfo(task)
 			 + " " + formatTaskPC(task)
-			 + spaces + eventType
+			 + spaces + stray + eventType
 			 + " " + eventName);
 	}
 


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-20 12:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-20 12:17 [SCM] master: Align correctly even stray items pmachata

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).