All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Oded Gabbay <ogabbay@kernel.org>
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	Ohad Sharabi <osharabi@habana.ai>
Subject: Re: [PATCH 3/3] habanalabs: trace DMA allocations
Date: Thu, 11 Aug 2022 09:53:04 -0400	[thread overview]
Message-ID: <20220811095304.3e97888a@gandalf.local.home> (raw)
In-Reply-To: <20220811113953.1963412-4-ogabbay@kernel.org>

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;
>  }
>  

      reply	other threads:[~2022-08-11 13:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 11:39 [PATCH 0/3] Adding support for trace events to habanalabs Oded Gabbay
2022-08-11 11:39 ` [PATCH 1/3] habanalabs: define trace events Oded Gabbay
2022-08-11 13:44   ` Steven Rostedt
2022-08-11 11:39 ` [PATCH 2/3] habanalabs: trace MMU map/unmap page Oded Gabbay
2022-08-11 13:50   ` Steven Rostedt
2022-08-11 11:39 ` [PATCH 3/3] habanalabs: trace DMA allocations Oded Gabbay
2022-08-11 13:53   ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220811095304.3e97888a@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ogabbay@kernel.org \
    --cc=osharabi@habana.ai \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.