ALSA: pcm: enable parameter tracepoints only when CONFIG_SND_DEBUG is enabled
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 6 Jun 2017 23:46:44 +0000 (08:46 +0900)
committerTakashi Iwai <tiwai@suse.de>
Wed, 7 Jun 2017 08:49:09 +0000 (10:49 +0200)
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_native.c

index b98b3ccde4f0436f09c7fe9a81764c111eb3aaf7..2ce3c98a1418962476a54bcb3508dcee17d24379 100644 (file)
 
 #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