From: fche@redhat.com (Frank Ch. Eigler)
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>, linux-perf-users@vger.kernel.org
Subject: Re: perf trace & vfs_getname
Date: Wed, 25 May 2016 14:00:22 -0400 [thread overview]
Message-ID: <y0m1t4qqaq1.fsf@fche.csb> (raw)
In-Reply-To: <20160524222107.GA8857@kernel.org> (Arnaldo Carvalho de Melo's message of "Tue, 24 May 2016 19:21:07 -0300")
acme wrote:
> [...]
>> I just wanted to try out your ongoing work to get file names printed in perf
>> trace:
>>
>> $ perf trace -e open ls builtin-trace.c
>> 0.007 ( 0.007 ms): ls/26364 open(filename: 0x2a1b0d20, flags: CLOEXEC
>> ) = -1 ENOENT No such file or directorybuiltin-trace.c
>> [...]
> For 'perf trace' to be a superset of strace it needs to pretty print
> syscall args other than integers, and for that we need things like the
> vfs_getname, or to go and look at several places where those syscalls
> are copied to the kernel (move_addr_to_kernel, gename_flags), and back
> (move_addr_to_user), etc.
In systemtap's case, we copy from userspace & pretty-print right from
the event where we detect the system call, not via a secondary
tracepoint like vfs_getname that would need to have its values
saved/coordinated.
> [...] Arch? I never tried it, would have to google for instructions
> on how to use, say, systemtap [...]
FYI, Arch is (in)famous for dropping debuginfo completely. Systemtap
can work out-of-the-box based on symbol table info only, but many
users end up recompiling their kernel with CONFIG_DEBUG_INFO=1 to get
the full capabilities.
Just as demo, this may work for you (including file names):
# stap -e '
probe nd_syscall.* { printf("%s/%d %s(%s) ", execname(), tid(), name, argstr) }
probe nd_syscall.*.return { printf("-> %s\n", retstr) }
'
... which is the core of what
/usr/share/doc/systemtap*/examples/*/strace.stp
does, sans process-filtering and other goodies.
- FChE
prev parent reply other threads:[~2016-05-25 18:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 20:42 perf trace & vfs_getname Milian Wolff
2016-05-24 22:21 ` Arnaldo Carvalho de Melo
2016-05-25 18:00 ` Frank Ch. Eigler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=y0m1t4qqaq1.fsf@fche.csb \
--to=fche@redhat.com \
--cc=acme@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=milian.wolff@kdab.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.