Date: Thu, 27 Feb 2003 12:54:13 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 26029 for review Message-ID: <200302272054.h1RKsDEg049343@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302272054.h1RKsDEg049343>