Module Name: src
Committed By: riastradh
Date: Mon Aug 27 14:20:41 UTC 2018
Modified Files:
src/sys/external/bsd/drm2/include/linux: fence.h
src/sys/external/bsd/drm2/linux: linux_fence.c
Log Message:
Make extremely noisy fence trace output conditional.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/drm2/include/linux/fence.h
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/linux/linux_fence.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/include/linux/fence.h
diff -u src/sys/external/bsd/drm2/include/linux/fence.h:1.14 src/sys/external/bsd/drm2/include/linux/fence.h:1.15
--- src/sys/external/bsd/drm2/include/linux/fence.h:1.14 Mon Aug 27 14:01:01 2018
+++ src/sys/external/bsd/drm2/include/linux/fence.h Mon Aug 27 14:20:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: fence.h,v 1.14 2018/08/27 14:01:01 riastradh Exp $ */
+/* $NetBSD: fence.h,v 1.15 2018/08/27 14:20:41 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -97,6 +97,8 @@ struct fence_cb {
#define fence_wait_any_timeout linux_fence_wait_any_timeout
#define fence_wait_timeout linux_fence_wait_timeout
+extern int linux_fence_trace;
+
void fence_init(struct fence *, const struct fence_ops *, spinlock_t *,
unsigned, unsigned);
void fence_destroy(struct fence *);
@@ -130,10 +132,12 @@ FENCE_TRACE(struct fence *f, const char
{
va_list va;
- va_start(va, fmt);
- printf("fence %u@%u: ", f->context, f->seqno);
- vprintf(fmt, va);
- va_end(va);
+ if (__predict_false(linux_fence_trace)) {
+ va_start(va, fmt);
+ printf("fence %u@%u: ", f->context, f->seqno);
+ vprintf(fmt, va);
+ va_end(va);
+ }
}
#endif /* _LINUX_FENCE_H_ */
Index: src/sys/external/bsd/drm2/linux/linux_fence.c
diff -u src/sys/external/bsd/drm2/linux/linux_fence.c:1.6 src/sys/external/bsd/drm2/linux/linux_fence.c:1.7
--- src/sys/external/bsd/drm2/linux/linux_fence.c:1.6 Mon Aug 27 14:13:16 2018
+++ src/sys/external/bsd/drm2/linux/linux_fence.c Mon Aug 27 14:20:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_fence.c,v 1.6 2018/08/27 14:13:16 riastradh Exp $ */
+/* $NetBSD: linux_fence.c,v 1.7 2018/08/27 14:20:41 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_fence.c,v 1.6 2018/08/27 14:13:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_fence.c,v 1.7 2018/08/27 14:20:41 riastradh Exp $");
#include <sys/atomic.h>
#include <sys/condvar.h>
@@ -44,6 +44,15 @@ __KERNEL_RCSID(0, "$NetBSD: linux_fence.
#include <linux/spinlock.h>
/*
+ * linux_fence_trace
+ *
+ * True if we print FENCE_TRACE messages, false if not. These are
+ * extremely noisy, too much even for AB_VERBOSE and AB_DEBUG in
+ * boothowto.
+ */
+int linux_fence_trace = 0;
+
+/*
* fence_referenced_p(fence)
*
* True if fence has a positive reference count. True after