* [PATCH] ALSA: firewire-lib: fix 'function sizeof not defined' error of tracepoints format
@ 2020-05-03 4:57 Takashi Sakamoto
2020-05-03 7:25 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Takashi Sakamoto @ 2020-05-03 4:57 UTC (permalink / raw)
To: clemens, tiwai; +Cc: alsa-devel, stable
The snd-firewire-lib.ko has 'amdtp-packet' event of tracepoints. Current
printk format for the event includes 'sizeof(u8)' macro expected to be
extended in compilation time. However, this is not done. As a result,
perf tools cannot parse the event for printing:
$ mount -l -t debugfs
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
$ cat /sys/kernel/debug/tracing/events/snd_firewire_lib/amdtp_packet/format
...
print fmt: "%02u %04u %04x %04x %02d %03u %02u %03u %02u %01u %02u %s",
REC->second, REC->cycle, REC->src, REC->dest, REC->channel,
REC->payload_quadlets, REC->data_blocks, REC->data_block_counter,
REC->packet_index, REC->irq, REC->index,
__print_array(__get_dynamic_array(cip_header),
__get_dynamic_array_len(cip_header),
sizeof(u8))
$ sudo perf record -e snd_firewire_lib:amdtp_packet
[snd_firewire_lib:amdtp_packet] function sizeof not defined
Error: expected type 5 but read 0
This commit fixes it by obsoleting the macro with actual size.
Cc: <stable@vger.kernel.org>
Fixes: bde2bbdb307a: ("ALSA: firewire-lib: use dynamic array for CIP header of tracing events")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
sound/firewire/amdtp-stream-trace.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/firewire/amdtp-stream-trace.h b/sound/firewire/amdtp-stream-trace.h
index 16c7f6605511..26e7cb555d3c 100644
--- a/sound/firewire/amdtp-stream-trace.h
+++ b/sound/firewire/amdtp-stream-trace.h
@@ -66,8 +66,7 @@ TRACE_EVENT(amdtp_packet,
__entry->irq,
__entry->index,
__print_array(__get_dynamic_array(cip_header),
- __get_dynamic_array_len(cip_header),
- sizeof(u8)))
+ __get_dynamic_array_len(cip_header), 1))
);
#endif
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: firewire-lib: fix 'function sizeof not defined' error of tracepoints format
2020-05-03 4:57 [PATCH] ALSA: firewire-lib: fix 'function sizeof not defined' error of tracepoints format Takashi Sakamoto
@ 2020-05-03 7:25 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2020-05-03 7:25 UTC (permalink / raw)
To: Takashi Sakamoto; +Cc: alsa-devel, clemens, stable
On Sun, 03 May 2020 06:57:18 +0200,
Takashi Sakamoto wrote:
>
> The snd-firewire-lib.ko has 'amdtp-packet' event of tracepoints. Current
> printk format for the event includes 'sizeof(u8)' macro expected to be
> extended in compilation time. However, this is not done. As a result,
> perf tools cannot parse the event for printing:
>
> $ mount -l -t debugfs
> debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
> $ cat /sys/kernel/debug/tracing/events/snd_firewire_lib/amdtp_packet/format
> ...
> print fmt: "%02u %04u %04x %04x %02d %03u %02u %03u %02u %01u %02u %s",
> REC->second, REC->cycle, REC->src, REC->dest, REC->channel,
> REC->payload_quadlets, REC->data_blocks, REC->data_block_counter,
> REC->packet_index, REC->irq, REC->index,
> __print_array(__get_dynamic_array(cip_header),
> __get_dynamic_array_len(cip_header),
> sizeof(u8))
>
> $ sudo perf record -e snd_firewire_lib:amdtp_packet
> [snd_firewire_lib:amdtp_packet] function sizeof not defined
> Error: expected type 5 but read 0
>
> This commit fixes it by obsoleting the macro with actual size.
>
> Cc: <stable@vger.kernel.org>
> Fixes: bde2bbdb307a: ("ALSA: firewire-lib: use dynamic array for CIP header of tracing events")
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Applied now with a correction of Fixes tag (removal of the superfluous
colon after commit id).
thanks,
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-03 7:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 4:57 [PATCH] ALSA: firewire-lib: fix 'function sizeof not defined' error of tracepoints format Takashi Sakamoto
2020-05-03 7:25 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).