Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2 Make extremely noisy fence trace outpu...



details:   https://anonhg.NetBSD.org/src/rev/f2f6bea8c954
branches:  trunk
changeset: 835357:f2f6bea8c954
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:20:41 2018 +0000

description:
Make extremely noisy fence trace output conditional.

diffstat:

 sys/external/bsd/drm2/include/linux/fence.h |  14 +++++++++-----
 sys/external/bsd/drm2/linux/linux_fence.c   |  13 +++++++++++--
 2 files changed, 20 insertions(+), 7 deletions(-)

diffs (69 lines):

diff -r c29993cfde3c -r f2f6bea8c954 sys/external/bsd/drm2/include/linux/fence.h
--- a/sys/external/bsd/drm2/include/linux/fence.h       Mon Aug 27 14:20:26 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/fence.h       Mon Aug 27 14:20:41 2018 +0000
@@ -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 @@
 #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 @@
 {
        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_ */
diff -r c29993cfde3c -r f2f6bea8c954 sys/external/bsd/drm2/linux/linux_fence.c
--- a/sys/external/bsd/drm2/linux/linux_fence.c Mon Aug 27 14:20:26 2018 +0000
+++ b/sys/external/bsd/drm2/linux/linux_fence.c Mon Aug 27 14:20:41 2018 +0000
@@ -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 @@
 #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



Home | Main Index | Thread Index | Old Index