* [PATCH v2 0/3] Adding support for trace events to habanalabs
@ 2022-08-21 8:06 Oded Gabbay
2022-08-21 8:06 ` [PATCH v2 1/3] habanalabs: define trace events Oded Gabbay
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Oded Gabbay @ 2022-08-21 8:06 UTC (permalink / raw)
To: rostedt; +Cc: linux-kernel, gregkh
Hi Steven,
Thanks for your comments. We have fixed the patches according to them.
You wrote the first patch is r-b, but I took the liberty to add your r-b to
all three patches, I hope you don't object.
Thanks,
Oded
Ohad Sharabi (3):
habanalabs: define trace events
habanalabs: trace MMU map/unmap page
habanalabs: trace DMA allocations
MAINTAINERS | 1 +
drivers/misc/habanalabs/common/device.c | 49 ++++++----
drivers/misc/habanalabs/common/habanalabs.h | 40 ++++++--
.../misc/habanalabs/common/habanalabs_drv.c | 3 +
drivers/misc/habanalabs/common/mmu/mmu.c | 7 ++
include/trace/events/habanalabs.h | 93 +++++++++++++++++++
6 files changed, 166 insertions(+), 27 deletions(-)
create mode 100644 include/trace/events/habanalabs.h
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/3] habanalabs: define trace events
2022-08-21 8:06 [PATCH v2 0/3] Adding support for trace events to habanalabs Oded Gabbay
@ 2022-08-21 8:06 ` Oded Gabbay
2022-08-21 8:06 ` [PATCH v2 2/3] habanalabs: trace MMU map/unmap page Oded Gabbay
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Oded Gabbay @ 2022-08-21 8:06 UTC (permalink / raw)
To: rostedt; +Cc: linux-kernel, gregkh, Ohad Sharabi
From: Ohad Sharabi <osharabi@habana.ai>
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>
---
Changes in v2:
- don't specify 1 or 0 when assigning to bool
- print string of true/false instead of 1/0
MAINTAINERS | 1 +
.../misc/habanalabs/common/habanalabs_drv.c | 3 +
include/trace/events/habanalabs.h | 90 +++++++++++++++++++
3 files changed, 94 insertions(+)
create mode 100644 include/trace/events/habanalabs.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 8a5012ba6ff9..5ce91ab67cb4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8883,6 +8883,7 @@ T: git https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
F: Documentation/ABI/testing/debugfs-driver-habanalabs
F: Documentation/ABI/testing/sysfs-driver-habanalabs
F: drivers/misc/habanalabs/
+F: include/trace/events/habanalabs.h
F: include/uapi/misc/habanalabs.h
HACKRF MEDIA DRIVER
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"
diff --git a/include/trace/events/habanalabs.h b/include/trace/events/habanalabs.h
new file mode 100644
index 000000000000..09ca516e1624
--- /dev/null
+++ b/include/trace/events/habanalabs.h
@@ -0,0 +1,90 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright 2016-2021 HabanaLabs, Ltd.
+ * All Rights Reserved.
+ *
+ */
+
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM habanalabs
+
+#if !defined(_TRACE_HABANALABS_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_HABANALABS_H
+
+#include <linux/tracepoint.h>
+
+DECLARE_EVENT_CLASS(habanalabs_mmu_template,
+ TP_PROTO(struct device *dev, u64 virt_addr, u64 phys_addr, u32 page_size, bool flush_pte),
+
+ TP_ARGS(dev, virt_addr, phys_addr, page_size, flush_pte),
+
+ TP_STRUCT__entry(
+ __string(dname, dev_name(dev))
+ __field(u64, virt_addr)
+ __field(u64, phys_addr)
+ __field(u32, page_size)
+ __field(u8, flush_pte)
+ ),
+
+ TP_fast_assign(
+ __assign_str(dname, dev_name(dev));
+ __entry->virt_addr = virt_addr;
+ __entry->phys_addr = phys_addr;
+ __entry->page_size = page_size;
+ __entry->flush_pte = flush_pte;
+ ),
+
+ TP_printk("%s: vaddr: %#llx, paddr: %#llx, psize: %#x, flush: %s",
+ __get_str(dname),
+ __entry->virt_addr,
+ __entry->phys_addr,
+ __entry->page_size,
+ __entry->flush_pte ? "true" : "false")
+);
+
+DEFINE_EVENT(habanalabs_mmu_template, habanalabs_mmu_map,
+ TP_PROTO(struct device *dev, u64 virt_addr, u64 phys_addr, u32 page_size, bool flush_pte),
+ TP_ARGS(dev, virt_addr, phys_addr, page_size, flush_pte));
+
+DEFINE_EVENT(habanalabs_mmu_template, habanalabs_mmu_unmap,
+ TP_PROTO(struct device *dev, u64 virt_addr, u64 phys_addr, u32 page_size, bool flush_pte),
+ TP_ARGS(dev, virt_addr, phys_addr, page_size, flush_pte));
+
+DECLARE_EVENT_CLASS(habanalabs_dma_alloc_template,
+ TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size),
+
+ TP_ARGS(dev, cpu_addr, dma_addr, size),
+
+ TP_STRUCT__entry(
+ __string(dname, dev_name(dev))
+ __field(u64, cpu_addr)
+ __field(u64, dma_addr)
+ __field(u32, size)
+ ),
+
+ TP_fast_assign(
+ __assign_str(dname, dev_name(dev));
+ __entry->cpu_addr = cpu_addr;
+ __entry->dma_addr = dma_addr;
+ __entry->size = size;
+ ),
+
+ TP_printk("%s: cpu_addr: %#llx, dma_addr: %#llx, size: %#x",
+ __get_str(dname),
+ __entry->cpu_addr,
+ __entry->dma_addr,
+ __entry->size)
+);
+
+DEFINE_EVENT(habanalabs_dma_alloc_template, habanalabs_dma_alloc,
+ TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size),
+ TP_ARGS(dev, cpu_addr, dma_addr, size));
+
+DEFINE_EVENT(habanalabs_dma_alloc_template, habanalabs_dma_free,
+ TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size),
+ TP_ARGS(dev, cpu_addr, dma_addr, size));
+
+#endif /* if !defined(_TRACE_HABANALABS_H) || defined(TRACE_HEADER_MULTI_READ) */
+
+/* This part must be outside protection */
+#include <trace/define_trace.h>
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] habanalabs: trace MMU map/unmap page
2022-08-21 8:06 [PATCH v2 0/3] Adding support for trace events to habanalabs Oded Gabbay
2022-08-21 8:06 ` [PATCH v2 1/3] habanalabs: define trace events Oded Gabbay
@ 2022-08-21 8:06 ` Oded Gabbay
2022-08-21 8:06 ` [PATCH v2 3/3] habanalabs: trace DMA allocations Oded Gabbay
2022-08-22 14:52 ` [PATCH v2 0/3] Adding support for trace events to habanalabs Steven Rostedt
3 siblings, 0 replies; 6+ messages in thread
From: Oded Gabbay @ 2022-08-21 8:06 UTC (permalink / raw)
To: rostedt; +Cc: linux-kernel, gregkh, Ohad Sharabi
From: Ohad Sharabi <osharabi@habana.ai>
This patch utilize the defined tracepoint to trace the MMU's pages
map/unmap operations.
Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
Changes in v2:
- Avoid check the return code in case tracing is disabled
drivers/misc/habanalabs/common/mmu/mmu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/misc/habanalabs/common/mmu/mmu.c b/drivers/misc/habanalabs/common/mmu/mmu.c
index 60740de47b34..f901e668a468 100644
--- a/drivers/misc/habanalabs/common/mmu/mmu.c
+++ b/drivers/misc/habanalabs/common/mmu/mmu.c
@@ -9,6 +9,8 @@
#include "../habanalabs.h"
+#include <trace/events/habanalabs.h>
+
/**
* hl_mmu_get_funcs() - get MMU functions structure
* @hdev: habanalabs device structure.
@@ -259,6 +261,9 @@ int hl_mmu_unmap_page(struct hl_ctx *ctx, u64 virt_addr, u32 page_size, bool flu
if (flush_pte)
mmu_funcs->flush(ctx);
+ if (trace_habanalabs_mmu_unmap_enabled() && !rc)
+ trace_habanalabs_mmu_unmap(hdev->dev, virt_addr, 0, page_size, flush_pte);
+
return rc;
}
@@ -344,6 +349,8 @@ int hl_mmu_map_page(struct hl_ctx *ctx, u64 virt_addr, u64 phys_addr, u32 page_s
if (flush_pte)
mmu_funcs->flush(ctx);
+ trace_habanalabs_mmu_map(hdev->dev, virt_addr, phys_addr, page_size, flush_pte);
+
return 0;
err:
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] habanalabs: trace DMA allocations
2022-08-21 8:06 [PATCH v2 0/3] Adding support for trace events to habanalabs Oded Gabbay
2022-08-21 8:06 ` [PATCH v2 1/3] habanalabs: define trace events Oded Gabbay
2022-08-21 8:06 ` [PATCH v2 2/3] habanalabs: trace MMU map/unmap page Oded Gabbay
@ 2022-08-21 8:06 ` Oded Gabbay
2022-08-22 14:52 ` [PATCH v2 0/3] Adding support for trace events to habanalabs Steven Rostedt
3 siblings, 0 replies; 6+ messages in thread
From: Oded Gabbay @ 2022-08-21 8:06 UTC (permalink / raw)
To: rostedt; +Cc: linux-kernel, gregkh, Ohad Sharabi
From: Ohad Sharabi <osharabi@habana.ai>
This patch add tracepoints in the code for DMA allocation.
The main purpose is to be able to cross data with the map operations and
determine whether memory violation occurred, for example free DMA
allocation before unmapping it from device memory.
To achieve this the DMA alloc/free code flows were refactored so that a
single DMA tracepoint will catch many flows.
To get better understanding of what happened in the DMA allocations
the real allocating function is added to the trace as well.
Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
Changes in v2:
- Avoid checking pointer is NULL in case tracing is disabled
drivers/misc/habanalabs/common/device.c | 49 +++++++++++++--------
drivers/misc/habanalabs/common/habanalabs.h | 40 +++++++++++++----
include/trace/events/habanalabs.h | 19 ++++----
3 files changed, 73 insertions(+), 35 deletions(-)
diff --git a/drivers/misc/habanalabs/common/device.c b/drivers/misc/habanalabs/common/device.c
index ab2497b6d164..d4ba67bfbb2e 100644
--- a/drivers/misc/habanalabs/common/device.c
+++ b/drivers/misc/habanalabs/common/device.c
@@ -13,6 +13,8 @@
#include <linux/pci.h>
#include <linux/hwmon.h>
+#include <trace/events/habanalabs.h>
+
#define HL_RESET_DELAY_USEC 10000 /* 10ms */
enum dma_alloc_type {
@@ -97,9 +99,10 @@ static int hl_access_sram_dram_region(struct hl_device *hdev, u64 addr, u64 *val
}
static void *hl_dma_alloc_common(struct hl_device *hdev, size_t size, dma_addr_t *dma_handle,
- gfp_t flag, enum dma_alloc_type alloc_type)
+ gfp_t flag, enum dma_alloc_type alloc_type,
+ const char *caller)
{
- void *ptr;
+ void *ptr = NULL;
switch (alloc_type) {
case DMA_ALLOC_COHERENT:
@@ -113,11 +116,16 @@ static void *hl_dma_alloc_common(struct hl_device *hdev, size_t size, dma_addr_t
break;
}
+ if (trace_habanalabs_dma_alloc_enabled() && !ZERO_OR_NULL_PTR(ptr))
+ trace_habanalabs_dma_alloc(hdev->dev, (u64) (uintptr_t) ptr, *dma_handle, size,
+ caller);
+
return ptr;
}
static void hl_asic_dma_free_common(struct hl_device *hdev, size_t size, void *cpu_addr,
- dma_addr_t dma_handle, enum dma_alloc_type alloc_type)
+ dma_addr_t dma_handle, enum dma_alloc_type alloc_type,
+ const char *caller)
{
switch (alloc_type) {
case DMA_ALLOC_COHERENT:
@@ -130,39 +138,44 @@ static void hl_asic_dma_free_common(struct hl_device *hdev, size_t size, void *c
hdev->asic_funcs->asic_dma_pool_free(hdev, cpu_addr, dma_handle);
break;
}
+
+ trace_habanalabs_dma_free(hdev->dev, (u64) (uintptr_t) cpu_addr, dma_handle, size, caller);
}
-void *hl_asic_dma_alloc_coherent(struct hl_device *hdev, size_t size, dma_addr_t *dma_handle,
- gfp_t flag)
+void *hl_asic_dma_alloc_coherent_caller(struct hl_device *hdev, size_t size, dma_addr_t *dma_handle,
+ gfp_t flag, const char *caller)
{
- return hl_dma_alloc_common(hdev, size, dma_handle, flag, DMA_ALLOC_COHERENT);
+ return hl_dma_alloc_common(hdev, size, dma_handle, flag, DMA_ALLOC_COHERENT, caller);
}
-void hl_asic_dma_free_coherent(struct hl_device *hdev, size_t size, void *cpu_addr,
- dma_addr_t dma_handle)
+void hl_asic_dma_free_coherent_caller(struct hl_device *hdev, size_t size, void *cpu_addr,
+ dma_addr_t dma_handle, const char *caller)
{
- hl_asic_dma_free_common(hdev, size, cpu_addr, dma_handle, DMA_ALLOC_COHERENT);
+ hl_asic_dma_free_common(hdev, size, cpu_addr, dma_handle, DMA_ALLOC_COHERENT, caller);
}
-void *hl_cpu_accessible_dma_pool_alloc(struct hl_device *hdev, size_t size, dma_addr_t *dma_handle)
+void *hl_cpu_accessible_dma_pool_alloc_caller(struct hl_device *hdev, size_t size,
+ dma_addr_t *dma_handle, const char *caller)
{
- return hl_dma_alloc_common(hdev, size, dma_handle, 0, DMA_ALLOC_CPU_ACCESSIBLE);
+ return hl_dma_alloc_common(hdev, size, dma_handle, 0, DMA_ALLOC_CPU_ACCESSIBLE, caller);
}
-void hl_cpu_accessible_dma_pool_free(struct hl_device *hdev, size_t size, void *vaddr)
+void hl_cpu_accessible_dma_pool_free_caller(struct hl_device *hdev, size_t size, void *vaddr,
+ const char *caller)
{
- hl_asic_dma_free_common(hdev, size, vaddr, 0, DMA_ALLOC_CPU_ACCESSIBLE);
+ hl_asic_dma_free_common(hdev, size, vaddr, 0, DMA_ALLOC_CPU_ACCESSIBLE, caller);
}
-void *hl_asic_dma_pool_zalloc(struct hl_device *hdev, size_t size, gfp_t mem_flags,
- dma_addr_t *dma_handle)
+void *hl_asic_dma_pool_zalloc_caller(struct hl_device *hdev, size_t size, gfp_t mem_flags,
+ dma_addr_t *dma_handle, const char *caller)
{
- return hl_dma_alloc_common(hdev, size, dma_handle, mem_flags, DMA_ALLOC_POOL);
+ return hl_dma_alloc_common(hdev, size, dma_handle, mem_flags, DMA_ALLOC_POOL, caller);
}
-void hl_asic_dma_pool_free(struct hl_device *hdev, void *vaddr, dma_addr_t dma_addr)
+void hl_asic_dma_pool_free_caller(struct hl_device *hdev, void *vaddr, dma_addr_t dma_addr,
+ const char *caller)
{
- hl_asic_dma_free_common(hdev, 0, vaddr, dma_addr, DMA_ALLOC_POOL);
+ hl_asic_dma_free_common(hdev, 0, vaddr, dma_addr, DMA_ALLOC_POOL, caller);
}
int hl_dma_map_sgtable(struct hl_device *hdev, struct sg_table *sgt, enum dma_data_direction dir)
diff --git a/drivers/misc/habanalabs/common/habanalabs.h b/drivers/misc/habanalabs/common/habanalabs.h
index 237a887b3a43..6e65ca05a1a0 100644
--- a/drivers/misc/habanalabs/common/habanalabs.h
+++ b/drivers/misc/habanalabs/common/habanalabs.h
@@ -143,6 +143,25 @@ enum hl_mmu_enablement {
#define HL_MAX_DCORES 8
+/* DMA alloc/free wrappers */
+#define hl_asic_dma_alloc_coherent(hdev, size, dma_handle, flags) \
+ hl_asic_dma_alloc_coherent_caller(hdev, size, dma_handle, flags, __func__)
+
+#define hl_cpu_accessible_dma_pool_alloc(hdev, size, dma_handle) \
+ hl_cpu_accessible_dma_pool_alloc_caller(hdev, size, dma_handle, __func__)
+
+#define hl_asic_dma_pool_zalloc(hdev, size, mem_flags, dma_handle) \
+ hl_asic_dma_pool_zalloc_caller(hdev, size, mem_flags, dma_handle, __func__)
+
+#define hl_asic_dma_free_coherent(hdev, size, cpu_addr, dma_handle) \
+ hl_asic_dma_free_coherent_caller(hdev, size, cpu_addr, dma_handle, __func__)
+
+#define hl_cpu_accessible_dma_pool_free(hdev, size, vaddr) \
+ hl_cpu_accessible_dma_pool_free_caller(hdev, size, vaddr, __func__)
+
+#define hl_asic_dma_pool_free(hdev, vaddr, dma_addr) \
+ hl_asic_dma_pool_free_caller(hdev, vaddr, dma_addr, __func__)
+
/*
* Reset Flags
*
@@ -3444,15 +3463,18 @@ static inline bool hl_mem_area_crosses_range(u64 address, u32 size,
}
uint64_t hl_set_dram_bar_default(struct hl_device *hdev, u64 addr);
-void *hl_asic_dma_alloc_coherent(struct hl_device *hdev, size_t size, dma_addr_t *dma_handle,
- gfp_t flag);
-void hl_asic_dma_free_coherent(struct hl_device *hdev, size_t size, void *cpu_addr,
- dma_addr_t dma_handle);
-void *hl_cpu_accessible_dma_pool_alloc(struct hl_device *hdev, size_t size, dma_addr_t *dma_handle);
-void hl_cpu_accessible_dma_pool_free(struct hl_device *hdev, size_t size, void *vaddr);
-void *hl_asic_dma_pool_zalloc(struct hl_device *hdev, size_t size, gfp_t mem_flags,
- dma_addr_t *dma_handle);
-void hl_asic_dma_pool_free(struct hl_device *hdev, void *vaddr, dma_addr_t dma_addr);
+void *hl_asic_dma_alloc_coherent_caller(struct hl_device *hdev, size_t size, dma_addr_t *dma_handle,
+ gfp_t flag, const char *caller);
+void hl_asic_dma_free_coherent_caller(struct hl_device *hdev, size_t size, void *cpu_addr,
+ dma_addr_t dma_handle, const char *caller);
+void *hl_cpu_accessible_dma_pool_alloc_caller(struct hl_device *hdev, size_t size,
+ dma_addr_t *dma_handle, const char *caller);
+void hl_cpu_accessible_dma_pool_free_caller(struct hl_device *hdev, size_t size, void *vaddr,
+ const char *caller);
+void *hl_asic_dma_pool_zalloc_caller(struct hl_device *hdev, size_t size, gfp_t mem_flags,
+ dma_addr_t *dma_handle, const char *caller);
+void hl_asic_dma_pool_free_caller(struct hl_device *hdev, void *vaddr, dma_addr_t dma_addr,
+ const char *caller);
int hl_dma_map_sgtable(struct hl_device *hdev, struct sg_table *sgt, enum dma_data_direction dir);
void hl_dma_unmap_sgtable(struct hl_device *hdev, struct sg_table *sgt,
enum dma_data_direction dir);
diff --git a/include/trace/events/habanalabs.h b/include/trace/events/habanalabs.h
index 09ca516e1624..f05c5fa668a2 100644
--- a/include/trace/events/habanalabs.h
+++ b/include/trace/events/habanalabs.h
@@ -51,15 +51,16 @@ DEFINE_EVENT(habanalabs_mmu_template, habanalabs_mmu_unmap,
TP_ARGS(dev, virt_addr, phys_addr, page_size, flush_pte));
DECLARE_EVENT_CLASS(habanalabs_dma_alloc_template,
- TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size),
+ TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size, const char *caller),
- TP_ARGS(dev, cpu_addr, dma_addr, size),
+ TP_ARGS(dev, cpu_addr, dma_addr, size, caller),
TP_STRUCT__entry(
__string(dname, dev_name(dev))
__field(u64, cpu_addr)
__field(u64, dma_addr)
__field(u32, size)
+ __field(const char *, caller)
),
TP_fast_assign(
@@ -67,22 +68,24 @@ DECLARE_EVENT_CLASS(habanalabs_dma_alloc_template,
__entry->cpu_addr = cpu_addr;
__entry->dma_addr = dma_addr;
__entry->size = size;
+ __entry->caller = caller;
),
- TP_printk("%s: cpu_addr: %#llx, dma_addr: %#llx, size: %#x",
+ TP_printk("%s: cpu_addr: %#llx, dma_addr: %#llx, size: %#x, caller: %s",
__get_str(dname),
__entry->cpu_addr,
__entry->dma_addr,
- __entry->size)
+ __entry->size,
+ __entry->caller)
);
DEFINE_EVENT(habanalabs_dma_alloc_template, habanalabs_dma_alloc,
- TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size),
- TP_ARGS(dev, cpu_addr, dma_addr, size));
+ TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size, const char *caller),
+ TP_ARGS(dev, cpu_addr, dma_addr, size, caller));
DEFINE_EVENT(habanalabs_dma_alloc_template, habanalabs_dma_free,
- TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size),
- TP_ARGS(dev, cpu_addr, dma_addr, size));
+ TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size, const char *caller),
+ TP_ARGS(dev, cpu_addr, dma_addr, size, caller));
#endif /* if !defined(_TRACE_HABANALABS_H) || defined(TRACE_HEADER_MULTI_READ) */
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/3] Adding support for trace events to habanalabs
2022-08-21 8:06 [PATCH v2 0/3] Adding support for trace events to habanalabs Oded Gabbay
` (2 preceding siblings ...)
2022-08-21 8:06 ` [PATCH v2 3/3] habanalabs: trace DMA allocations Oded Gabbay
@ 2022-08-22 14:52 ` Steven Rostedt
2022-08-22 19:19 ` Oded Gabbay
3 siblings, 1 reply; 6+ messages in thread
From: Steven Rostedt @ 2022-08-22 14:52 UTC (permalink / raw)
To: Oded Gabbay; +Cc: linux-kernel, gregkh
On Sun, 21 Aug 2022 11:06:05 +0300
Oded Gabbay <ogabbay@kernel.org> wrote:
> Thanks for your comments. We have fixed the patches according to them.
>
> You wrote the first patch is r-b, but I took the liberty to add your r-b to
> all three patches, I hope you don't object.
I usually only add the r-b to the patches that add TRACE_EVENT(), and
sometimes to those that modify them. Because that's what I know best. The
usage of the trace events is usually subsystem specific and I tend not to
add a r-b for them because people might think I understand how they are
being used ;-)
But in this case, since I did recommend some tricks in those extra patches,
you can keep the tag for them.
Here's my disclaimer for all these patches:
***
Reviewed only from the tracing point of view, I have no idea if the content
held in the trace is correct or not.
***
;-)
-- Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/3] Adding support for trace events to habanalabs
2022-08-22 14:52 ` [PATCH v2 0/3] Adding support for trace events to habanalabs Steven Rostedt
@ 2022-08-22 19:19 ` Oded Gabbay
0 siblings, 0 replies; 6+ messages in thread
From: Oded Gabbay @ 2022-08-22 19:19 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Linux-Kernel@Vger. Kernel. Org, Greg Kroah-Hartman
On Mon, Aug 22, 2022 at 5:52 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Sun, 21 Aug 2022 11:06:05 +0300
> Oded Gabbay <ogabbay@kernel.org> wrote:
>
> > Thanks for your comments. We have fixed the patches according to them.
> >
> > You wrote the first patch is r-b, but I took the liberty to add your r-b to
> > all three patches, I hope you don't object.
>
> I usually only add the r-b to the patches that add TRACE_EVENT(), and
> sometimes to those that modify them. Because that's what I know best. The
> usage of the trace events is usually subsystem specific and I tend not to
> add a r-b for them because people might think I understand how they are
> being used ;-)
>
> But in this case, since I did recommend some tricks in those extra patches,
> you can keep the tag for them.
>
> Here's my disclaimer for all these patches:
>
> ***
>
> Reviewed only from the tracing point of view, I have no idea if the content
> held in the trace is correct or not.
>
> ***
>
> ;-)
>
> -- Steve
Disclaimer duly noted Steve ;-)
Thanks for the review.
Oded
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-08-22 19:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-21 8:06 [PATCH v2 0/3] Adding support for trace events to habanalabs Oded Gabbay
2022-08-21 8:06 ` [PATCH v2 1/3] habanalabs: define trace events Oded Gabbay
2022-08-21 8:06 ` [PATCH v2 2/3] habanalabs: trace MMU map/unmap page Oded Gabbay
2022-08-21 8:06 ` [PATCH v2 3/3] habanalabs: trace DMA allocations Oded Gabbay
2022-08-22 14:52 ` [PATCH v2 0/3] Adding support for trace events to habanalabs Steven Rostedt
2022-08-22 19:19 ` Oded Gabbay
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.