From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Tom Zanussi <tzanussi@gmail.com>,
Steven Rostedt <srostedt@redhat.com>, Ingo Molnar <mingo@elte.hu>,
Jiri Olsa <jolsa@redhat.com>,
Masami Hiramatsu <mhiramat@redhat.com>,
Oleg Nesterov <oleg@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] Full syscall argument decode in "perf trace"
Date: Tue, 17 Sep 2013 14:52:01 -0300 [thread overview]
Message-ID: <20130917175201.GA3918@infradead.org> (raw)
In-Reply-To: <523870FF.3030306@redhat.com>
Em Tue, Sep 17, 2013 at 05:10:55PM +0200, Denys Vlasenko escreveu:
> I'm trying to figure out how to extend "perf trace".
> Currently, it shows syscall names and arguments, and only them.
> Meaning that syscalls such as open(2) are shown as:
> open(filename: 140736118412184, flags: 0, mode: 140736118403776) = 3
> The problem is, of course, that user wants to see the filename
> per se, not the address of its first byte.
> To improve that, we need to fetch the pointed-to data.
> There are two approaches to this: extending
> "raw_syscalls:sys_{enter,exit}" tracepoint so that it returns this data,
> or selectively stopping the traced process when it reaches the thacepoint.
We don't want to stop the process at all, this is one of the major
advantages of 'perf trace' over 'strace'.
Look at the tmp.perf/trace2 branch in my git repo, tglx and Ingo added a
tracepoint to vfs_getname to use that.
> First solution is attractive performance-wise, but requires a lot
> of new code: *ALL* syscalls will need to know which arguments are pointers,
> how large their pointed-to data structures are, and (remember
> readv and friends!) some of pointed-to structures themselves
> contain pointers which reference even more data.
Well, we can look at DWARF to get the function signatures, types,
librarize 'perf probe' and insert probes in the syscalls we want
decoding.
That for the cases where we don't have a tracepoint or when adding a new
tracepoint is not an option.
And this all with what we have in the kernel right now.
Also for 'perf trace' look at my perf/core branch, where we have more
syscall arg beautifiers and the machinery that is getting in place to
allow that.
Longer term we could have something like dtrace's CTF to have a more
compact type only ELF section that always go with the kernel, like we
have CFI in binaries these days.
- Arnaldo
next prev parent reply other threads:[~2013-09-17 17:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-17 15:10 [RFC] Full syscall argument decode in "perf trace" Denys Vlasenko
2013-09-17 17:52 ` Arnaldo Carvalho de Melo [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-09-17 19:06 Arnaldo Carvalho de Melo
2013-09-18 11:35 ` Denys Vlasenko
2013-09-18 12:46 ` David Ahern
2013-09-18 13:35 ` Ingo Molnar
2013-09-18 14:33 ` Arnaldo Carvalho de Melo
2013-09-26 7:41 ` Denys Vlasenko
2013-09-30 11:33 ` Denys Vlasenko
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=20130917175201.GA3918@infradead.org \
--to=acme@redhat.com \
--cc=dvlasenk@redhat.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=srostedt@redhat.com \
--cc=tzanussi@gmail.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.