From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: tiwai@suse.de
Cc: alsa-devel@alsa-project.org
Subject: [PATCH 2/3] ALSA: pcm: enable parameter tracepoints only when CONFIG_SND_DEBUG is enabled
Date: Wed, 7 Jun 2017 08:46:44 +0900 [thread overview]
Message-ID: <20170606234645.13775-3-o-takashi@sakamocchi.jp> (raw)
In-Reply-To: <20170606234645.13775-1-o-takashi@sakamocchi.jp>
In a previous commit, tracepoints are added for PCM parameter processing.
As long as I know, this implementation increases size of relocatable
object by 35%. For vendors who are conscious of memory footprint, it
brings apparent disadvantage.
This commit utilizes CONFIG_SND_DEBUG configuration to enable/disable the
tracepoints.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
sound/core/pcm_native.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index b98b3ccde4f0..2ce3c98a1418 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -39,8 +39,15 @@
#include "pcm_local.h"
+#ifdef CONFIG_SND_DEBUG
#define CREATE_TRACE_POINTS
#include "pcm_param_trace.h"
+#else
+#define trace_hw_mask_param_enabled() 0
+#define trace_hw_interval_param_enabled() 0
+#define trace_hw_mask_param(substream, type, index, prev, curr)
+#define trace_hw_interval_param(substream, type, index, prev, curr)
+#endif
/*
* Compatibility
--
2.11.0
next prev parent reply other threads:[~2017-06-06 23:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 23:46 [PATCH 0/3] ALSA: pcm: add tracepoints for PCM params refinement Takashi Sakamoto
2017-06-06 23:46 ` [PATCH 1/3] ALSA: pcm: tracepoints for refining PCM parameters Takashi Sakamoto
2017-06-06 23:46 ` Takashi Sakamoto [this message]
2017-06-06 23:46 ` [PATCH 3/3] ALSA: pcm: obsolete RULES_DEBUG local macro Takashi Sakamoto
2017-06-07 5:42 ` [PATCH 0/3] ALSA: pcm: add tracepoints for PCM params refinement Takashi Iwai
2017-06-07 7:50 ` Takashi Sakamoto
2017-06-07 8:09 ` Takashi Iwai
2017-06-07 8:38 ` Takashi Sakamoto
2017-06-07 8:50 ` Takashi Iwai
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=20170606234645.13775-3-o-takashi@sakamocchi.jp \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/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.