Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2012 19:20:00 +0000
From:      gmiller@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r239814 - in soc2012/gmiller/locking-head: . lib/libwitness
Message-ID:  <20120726192000.1CB061065672@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gmiller
Date: Thu Jul 26 19:19:59 2012
New Revision: 239814
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=239814

Log:
   r239869@FreeBSD-dev:  root | 2012-07-23 19:11:32 -0500
   Eliminate another source of suboptimal graphs.

Modified:
  soc2012/gmiller/locking-head/   (props changed)
  soc2012/gmiller/locking-head/lib/libwitness/graph.c

Modified: soc2012/gmiller/locking-head/lib/libwitness/graph.c
==============================================================================
--- soc2012/gmiller/locking-head/lib/libwitness/graph.c	Thu Jul 26 18:15:48 2012	(r239813)
+++ soc2012/gmiller/locking-head/lib/libwitness/graph.c	Thu Jul 26 19:19:59 2012	(r239814)
@@ -95,6 +95,8 @@
 int
 insert_lock(struct lock_info *from, struct lock_info *to)
 {
+	struct lock_info *child;
+
 	if (from == to || from == NULL || to == NULL) {
 		return (0);
 	}
@@ -108,6 +110,13 @@
 	to->sibling = from->child;
 	from->child = to;
 
+	child = to->sibling;
+	while (child != NULL) {
+		optimize_links(child);
+
+		child = child->sibling;
+	}
+
 	optimize_links(to);
 
 	return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120726192000.1CB061065672>