Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2003 08:14:53 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 26496 for review
Message-ID:  <200303071614.h27GErTD054900@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=26496

Change 26496 by jhb@jhb_laptop on 2003/03/07 08:14:28

	Try a more efficient (O(n) rather than O(n^2)) way of deciding
	when to start displaying a hierarchy for witness_display_list().
	Display a hierarchy for each witness with a level of 0.

Affected files ...

.. //depot/projects/smpng/sys/kern/subr_witness.c#86 edit

Differences ...

==== //depot/projects/smpng/sys/kern/subr_witness.c#86 (text+ko) ====

@@ -492,12 +492,20 @@
 witness_display_list(void(*prnt)(const char *fmt, ...),
 		     struct witness_list *list)
 {
+#if 1
+	struct witness *w;
+#else
 	struct witness *w, *w1;
 	int found;
+#endif
 
 	STAILQ_FOREACH(w, list, w_typelist) {
 		if (w->w_file == NULL)
 			continue;
+#if 1
+		if (w->w_level > 0)
+			continue;
+#else
 		found = 0;
 		STAILQ_FOREACH(w1, list, w_typelist) {
 			if (isitmychild(w1, w)) {
@@ -507,6 +515,7 @@
 		}
 		if (found)
 			continue;
+#endif
 		/*
 		 * This lock has no anscestors, display its descendants. 
 		 */

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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