summaryrefslogtreecommitdiff
path: root/lib/igt_core.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2019-10-14 18:02:25 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2019-10-18 17:33:08 +0300
commit0035bff08078a444d4572ba2eaf79523dc885857 (patch)
treea1b5af5be8fa144244d13592cec6d7e0e813e31c /lib/igt_core.h
parentbb5735423eaf6fdbf6b2f94ef0b8520e74eab993 (diff)
lib: Add igt_trace()
Add igt_trace() which can be used to inject messages into the kernel ftrace buffer via the trace_marker file. Quite useful when trying to correlate test case activity with kernel tracepoints. v2: Use igt_debugfs_mount() (Chris) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'lib/igt_core.h')
-rw-r--r--lib/igt_core.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/igt_core.h b/lib/igt_core.h
index 521cda10..e8b61128 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -1191,6 +1191,15 @@ int igt_system_quiet(const char *command);
} while (0)
/**
+ * igt_trace:
+ * @format: printf-style format string with optional args
+ *
+ * Writes a message into the kernel trace log.
+ */
+__attribute__((format(printf, 1, 2)))
+void igt_trace(const char *format, ...);
+
+/**
* igt_kmsg:
* @format: printf-style format string with optional args
*