Thread (7 messages) flat view 7 messages, 3 authors, 2021-11-03

Re: [PATCH net-next 3/3] net/smc: Introduce tracepoint for smcr link down

From: Tony Lu <tonylu@linux.alibaba.com>
Date: 2021-11-03 06:57:13
Also in: linux-rdma, linux-s390

On Tue, Nov 02, 2021 at 10:30:22AM +0100, Karsten Graul wrote:
On 01/11/2021 08:39, Tony Lu wrote:
quoted
+
+	    TP_printk("lnk=%p lgr=%p state=%d dev=%s location=%p",
+		      __entry->lnk, __entry->lgr,
+		      __entry->state, __get_str(name),
+		      __entry->location)
The location is printed as pointer (which might even be randomized?),
is it possible to print the function name of the caller, as described
here: https://stackoverflow.com/questions/4141324/function-caller-in-linux-kernel

  printk("Caller is %pS\n", __builtin_return_address(0));

Not sure if this is possible with the trace points, but it would be
easier to use. You plan to use a dump to find out about the function caller?
Yes, I am going to find out where caused the SMC-R link down. In our
test environment, the tracepoint for link down help me to debug the root
cause of link termination, without eBPF or systemtap.

By using "%pS", it makes the trace log easy to show the function caller
name without additional translating.

  <idle>-0       [000] ..s.    69.087164: smcr_link_down: lnk=00000000dab41cdc lgr=000000007d5d8e24 state=0 rc=1 dev=mlx5_0 location=smc_wr_tx_tasklet_fn+0x5ef/0x6f0 [smc]

I will improve it in the next patch.

Cheers,
Tony Lu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help