Messages in this thread | | | Date | Thu, 11 Aug 2022 09:53:04 -0400 | From | Steven Rostedt <> | Subject | Re: [PATCH 3/3] habanalabs: trace DMA allocations |
| |
On Thu, 11 Aug 2022 14:39:53 +0300 Oded Gabbay <ogabbay@kernel.org> wrote:
> @@ -113,11 +116,16 @@ static void *hl_dma_alloc_common(struct hl_device *hdev, size_t size, dma_addr_t > break; > } > > + if (!ZERO_OR_NULL_PTR(ptr))
If you change the above to:
if (trace_habanalabs_dma_alloc_enabled() && !ZERO_OR_NULL_PTR(ptr))
The conditional check will be skipped when this tracepoint is disabled.
-- Steve
> + trace_habanalabs_dma_alloc(hdev->dev, (u64) (uintptr_t) ptr, *dma_handle, size, > + caller); > + > return ptr; > } >
| |