summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs
diff options
context:
space:
mode:
authorOhad Sharabi <osharabi@habana.ai>2022-06-08 09:58:59 +0300
committerOded Gabbay <ogabbay@kernel.org>2022-09-18 13:29:53 +0300
commit191a4443c39b278fbb0898590530bef122b26b7e (patch)
tree2b43f88d06917119aa138b542706fe2f2b9728fb /drivers/misc/habanalabs
parent7b5d13c9cae72b9baac88009401d5518cd86bb0d (diff)
downloadlinux-191a4443c39b278fbb0898590530bef122b26b7e.tar.xz
habanalabs: define trace events
This patch adds trace events for habanalabs driver to gain all the benefits such an infrastructure can supply. The following events were added: - MMU map/unmap: to be able to track driver's memory allocations - DMA alloc/free: to track our DMA allocation the above trace points in conjunction will help us map the device memory usage as well as to be able to track memory violations. Signed-off-by: Ohad Sharabi <osharabi@habana.ai> Acked-by: Oded Gabbay <ogabbay@kernel.org> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs')
-rw-r--r--drivers/misc/habanalabs/common/habanalabs_drv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/common/habanalabs_drv.c b/drivers/misc/habanalabs/common/habanalabs_drv.c
index 8026793d9083..e12148428731 100644
--- a/drivers/misc/habanalabs/common/habanalabs_drv.c
+++ b/drivers/misc/habanalabs/common/habanalabs_drv.c
@@ -14,6 +14,9 @@
#include <linux/aer.h>
#include <linux/module.h>
+#define CREATE_TRACE_POINTS
+#include <trace/events/habanalabs.h>
+
#define HL_DRIVER_AUTHOR "HabanaLabs Kernel Driver Team"
#define HL_DRIVER_DESC "Driver for HabanaLabs's AI Accelerators"