Skip to content

Commit e4baf84

Browse files
johnkeepingtiwai
authored andcommitted
ALSA: pcm: fix tracing reason in hw_ptr_error
Strings need to be specially marked in trace events to ensure the content is captured, othewise the trace just shows the value of the pointer. Signed-off-by: John Keeping <[email protected]> Reviewed-by: Takashi Sakamoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 9d86515 commit e4baf84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sound/core/pcm_trace.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,19 @@ TRACE_EVENT(hw_ptr_error,
8888
__field( unsigned int, device )
8989
__field( unsigned int, number )
9090
__field( unsigned int, stream )
91-
__field( const char *, reason )
91+
__string( reason, why )
9292
),
9393
TP_fast_assign(
9494
__entry->card = (substream)->pcm->card->number;
9595
__entry->device = (substream)->pcm->device;
9696
__entry->number = (substream)->number;
9797
__entry->stream = (substream)->stream;
98-
__entry->reason = (why);
98+
__assign_str(reason, why);
9999
),
100100
TP_printk("pcmC%dD%d%s/sub%d: ERROR: %s",
101101
__entry->card, __entry->device,
102102
__entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? "p" : "c",
103-
__entry->number, __entry->reason)
103+
__entry->number, __get_str(reason))
104104
);
105105

106106
TRACE_EVENT(applptr,

0 commit comments

Comments
 (0)