From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@redhat.com>, Jiri Olsa <jolsa@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Namhyung Kim <namhyung@kernel.org>
Subject: Re: [RFC] perf tool improvement requests
Date: Tue, 4 Sep 2018 18:05:41 +0200 [thread overview]
Message-ID: <20180904160541.GK24124@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CABPqkBSm9xgqiPx1hUY2njn3SsPGhxjqK02HbM5Qar8di-q97w@mail.gmail.com>
On Tue, Sep 04, 2018 at 08:50:07AM -0700, Stephane Eranian wrote:
> > > When we get an exact IP (using PEBS) and were sampling a data related
> > > event (say L1 misses), we can get the data type from the instruction
> > > itself; that is, through DWARF. We _know_ what type (structure::member)
> > > is read/written to.
> >
> I have been asking this from the compiler people for a long time!
> I don't think it is there. I'd like each load/store to be annotated
> with a data type + offset
> within the type. It would allow data type profiling. This would not be
> bulletproof though
> because of the accessor function problem:
> void incr(int *v) { (*v)++; }
> struct foo { int a, int b } bar;
> incr(&bar.a);
Cute, yes. Also, array accesses are tricky.
But I think even with those caveats it would be _very_ useful.
> There are concern with the volume of data that this
> would generate. But my argument
> is that this is just debug binaries, does not make the stripped binary
> any bigger.
Right; the alternative is that we build an asm interpreter and follow
the data types throughout the function, because DWARF can tell us about
the types at a number of places, like function call arguments etc..
That is, of course, a terrible lot of work :/
prev parent reply other threads:[~2018-09-04 16:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-04 2:45 Stephane Eranian
2018-09-04 7:10 ` Peter Zijlstra
2018-09-04 13:42 ` Arnaldo Carvalho de Melo
2018-09-04 13:53 ` Peter Zijlstra
2018-09-04 13:58 ` Jiri Olsa
2018-09-04 14:08 ` Arnaldo Carvalho de Melo
2018-09-04 14:17 ` Peter Zijlstra
2018-09-04 14:35 ` Arnaldo Carvalho de Melo
2018-09-04 15:50 ` Stephane Eranian
2018-09-04 16:05 ` Peter Zijlstra [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=20180904160541.GK24124@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome