From owner-svn-soc-all@FreeBSD.ORG Thu Jul 26 19:20:02 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 1CB061065672 for ; Thu, 26 Jul 2012 19:20:00 +0000 (UTC) (envelope-from gmiller@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Thu, 26 Jul 2012 19:20:00 +0000 Date: Thu, 26 Jul 2012 19:20:00 +0000 From: gmiller@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120726192000.1CB061065672@hub.freebsd.org> Cc: Subject: socsvn commit: r239814 - in soc2012/gmiller/locking-head: . lib/libwitness X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jul 2012 19:20:02 -0000 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);