Thread (47 messages) 47 messages, 6 authors, 2023-06-21

Re: [PATCH v3 bpf-next 03/10] bpftool: Show probed function in kprobe_multi link info

From: Andrii Nakryiko <hidden>
Date: 2023-06-20 17:17:27
Also in: bpf

On Fri, Jun 16, 2023 at 8:09 PM Yafang Shao [off-list ref] wrote:
On Sat, Jun 17, 2023 at 1:30 AM Andrii Nakryiko
[off-list ref] wrote:
quoted
On Mon, Jun 12, 2023 at 8:16 AM Yafang Shao [off-list ref] wrote:
quoted
Show the already expose kprobe_multi link info in bpftool. The result as
follows,

52: kprobe_multi  prog 381
        retprobe 0  func_cnt 7
        addrs ffffffff9ec44f20  funcs schedule_timeout_interruptible
              ffffffff9ec44f60        schedule_timeout_killable
              ffffffff9ec44fa0        schedule_timeout_uninterruptible
              ffffffff9ec44fe0        schedule_timeout_idle
              ffffffffc09468d0        xfs_trans_get_efd [xfs]
              ffffffffc0953a10        xfs_trans_get_buf_map [xfs]
              ffffffffc0957320        xfs_trans_get_dqtrx [xfs]
        pids kprobe_multi(559862)
53: kprobe_multi  prog 381
        retprobe 1  func_cnt 7
        addrs ffffffff9ec44f20  funcs schedule_timeout_interruptible
              ffffffff9ec44f60        schedule_timeout_killable
              ffffffff9ec44fa0        schedule_timeout_uninterruptible
              ffffffff9ec44fe0        schedule_timeout_idle
              ffffffffc09468d0        xfs_trans_get_efd [xfs]
              ffffffffc0953a10        xfs_trans_get_buf_map [xfs]
              ffffffffc0957320        xfs_trans_get_dqtrx [xfs]
it all subjective, but this format is a bit weird where "addrs" and
"funcs" is in first row to the left. Just makes everything wider. Why
not something like

addr              func
ffffffff9ec44f20  schedule_timeout_interruptible
ffffffff9ec44f60  schedule_timeout_killable
ffffffffc0953a10  xfs_trans_get_buf_map [xfs]
ffffffffc0957320  xfs_trans_get_dqtrx [xfs]
It may be a little strange if there's only one function, but I don't
mind doing it as you suggested.
quoted
Not it's singular (addr and func) because it's column names,
basically. Can also do "addr func [module]".
The length of the function name is variable, so it is not easy to
determine where to put the "[module]". So I prefer to not show  the
"[module]".
"func [module]" in the header will give a hint of what is that value
in square brackets. I didn't mean to align it into a third column

--
Regards
Yafang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help