From owner-p4-projects Thu Feb 27 12:54:18 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 972AF37B405; Thu, 27 Feb 2003 12:54:15 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 421D637B401 for ; Thu, 27 Feb 2003 12:54:15 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71F8143FD7 for ; Thu, 27 Feb 2003 12:54:14 -0800 (PST) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h1RKsE0U049346 for ; Thu, 27 Feb 2003 12:54:14 -0800 (PST) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h1RKsDEg049343 for perforce@freebsd.org; Thu, 27 Feb 2003 12:54:13 -0800 (PST) Date: Thu, 27 Feb 2003 12:54:13 -0800 (PST) Message-Id: <200302272054.h1RKsDEg049343@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 26029 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=26029 Change 26029 by jhb@jhb_laptop on 2003/02/27 12:53:52 Axe implicit file and line from witness_warn now that we have descriptive messages and add it to the one case the file and line are useful explicitly. Affected files ... .. //depot/projects/smpng/sys/kern/kern_mac.c#16 edit .. //depot/projects/smpng/sys/kern/subr_witness.c#70 edit .. //depot/projects/smpng/sys/sys/lock.h#24 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_mac.c#16 (text+ko) ==== @@ -274,7 +274,7 @@ */ #define MAC_POLICY_LIST_EXCLUSIVE() do { \ WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, \ - "mac_policy_list_exclusive()"); \ + "mac_policy_list_exclusive() at %s:%d", __FILE__, __LINE__);\ mtx_lock(&mac_policy_list_lock); \ while (mac_policy_list_busy != 0) \ cv_wait(&mac_policy_list_not_busy, \ ==== //depot/projects/smpng/sys/kern/subr_witness.c#70 (text+ko) ==== @@ -945,8 +945,7 @@ * flags then a failure results in a panic as well. */ int -witness_warn(int flags, struct lock_object *lock, const char *file, int line, - const char *fmt, ...) +witness_warn(int flags, struct lock_object *lock, const char *fmt, ...) { struct lock_list_entry *lle; struct lock_instance *lock1; @@ -976,7 +975,7 @@ printf(" with the following"); if (flags & WARN_SLEEPOK) printf(" non-sleepable"); - printf("locks held at %s:%d:\n", file, line); + printf("locks held:\n"); } n++; witness_list_lock(lock1); @@ -993,7 +992,7 @@ printf(" with the following"); if (flags & WARN_SLEEPOK) printf(" non-sleepable"); - printf("locks held at %s:%d:\n", file, line); + printf("locks held:\n"); } n += witness_list_locks(PCPU_PTR(spinlocks)); } ==== //depot/projects/smpng/sys/sys/lock.h#24 (text+ko) ==== @@ -205,8 +205,7 @@ void witness_save(struct lock_object *, const char **, int *); void witness_restore(struct lock_object *, const char *, int); int witness_list_locks(struct lock_list_entry **); -int witness_warn(int, struct lock_object *, const char *, int, - const char *, ...); +int witness_warn(int, struct lock_object *, const char *, ...); void witness_assert(struct lock_object *, int, const char *, int); void witness_display_spinlock(struct lock_object *, struct thread *); int witness_line(struct lock_object *); @@ -238,7 +237,7 @@ witness_unlock((lock), (flags), (file), (line)) #define WITNESS_WARN(flags, lock, fmt, ...) \ - witness_warn((flags), (lock), __FILE__, __LINE__, (fmt), ## __VA_ARGS__) + witness_warn((flags), (lock), (fmt), ## __VA_ARGS__) #define WITNESS_SAVE_DECL(n) \ const char * __CONCAT(n, __wf); \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message