socsvn commit: r239814 - in soc2012/gmiller/locking-head: . lib/libwitness

gmiller at FreeBSD.org gmiller at FreeBSD.org
Thu Jul 26 19:20:02 UTC 2012


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 at 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);


More information about the svn-soc-all mailing list