[PATCHv3 3/3] dynamic_debug: Add a flag for dynamic event tracing
Steven Rostedt
rostedt at goodmis.org
Tue Nov 9 07:49:41 PST 2021
On Tue, 9 Nov 2021 17:38:21 +0530
Sai Prakash Ranjan <quic_saipraka at quicinc.com> wrote:
> Debugging a specific driver or subsystem can be a lot easier if we can
> trace events specific to that driver or subsystem. This type of
> filtering can be achieved using existing dynamic debug library which
> provides a way to filter based on files, functions and modules.
>
> Using this, provide an additional flag 'e' to filter event tracing to
> specified input.
>
> For example, tracing all MMIO read/write can be overwhelming and of no
> use when debugging a specific driver or a subsystem. So switch to
> dynamic event tracing for register accesses.
>
> Example: Tracing register accesses for all drivers in drivers/soc/qcom/*
> and the trace output is given below:
>
> # dyndbg="file drivers/soc/qcom/* +e" trace_event=rwmmio
> or
> # echo "file drivers/soc/qcom/* +e" > /sys/kernel/debug/dynamic_debug/control
> # cat /sys/kernel/debug/tracing/trace
FYI, it's best to use /sys/kernel/tracing, as the debug/tracing is only
there for backward compatibility.
> rwmmio_read: rpmh_rsc_probe+0x35c/0x410 readl addr=0xffff80001071000c
> rwmmio_read: rpmh_rsc_probe+0x3d0/0x410 readl addr=0xffff800010710004
> rwmmio_write: rpmh_rsc_probe+0x3b0/0x410 writel addr=0xffff800010710d00 val=0x3
> rwmmio_write: write_tcs_cmd+0x6c/0x78 writel addr=0xffff800010710d30 val=0x10108
I'd much rather have a module name or something attached to the event that
ca be filtered on via the trace event filters, than having it determined by
some side effect done in another directory.
-- Steve
More information about the linux-arm-kernel
mailing list