net/mlx5: FW tracer, parse traces and kernel tracing support
authorFeras Daoud <ferasda@mellanox.com>
Sun, 18 Feb 2018 08:06:35 +0000 (10:06 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 23 Jul 2018 22:01:11 +0000 (15:01 -0700)
commit70dd6fdb8987b14f7b6105f6be0617299e459398
tree34b64f121ffd4dbbdf464bebdc884d514cddc29c
parentc71ad41ccb0c29fce95149b74786574b354c9dda
net/mlx5: FW tracer, parse traces and kernel tracing support

For each message the driver should do the following:
1- Find the message string in the strings database
2- Count the param number of each message
3- Wait for the param events and accumulate them
4- Calculate the event timestamp using the local event timestamp
and the first timestamp event following it.
5- Print message to trace log

Enable the tracing by:
echo 1 > /sys/kernel/debug/tracing/events/mlx5/mlx5_fw/enable

Read traces by:
cat /sys/kernel/debug/tracing/trace

Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.h
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer_tracepoint.h [new file with mode: 0644]