From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
"Liang, Kan" <kan.liang@intel.com>,
"mingo@redhat.com" <mingo@redhat.com>,
LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"ak@linux.intel.com" <ak@linux.intel.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Subject: Re: [PATCH V6] perf: Add PERF_SAMPLE_PHYS_ADDR
Date: Thu, 31 Aug 2017 13:44:37 -0300 [thread overview]
Message-ID: <20170831164437.GJ4831@kernel.org> (raw)
In-Reply-To: <CABPqkBSeYKjZ9eKzrALFcv8gHJ2RWQaBntkpe2Fk5=mznDCs+A@mail.gmail.com>
Em Wed, Aug 23, 2017 at 10:00:37AM -0700, Stephane Eranian escreveu:
> On Wed, Aug 23, 2017 at 7:39 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Wed, Aug 23, 2017 at 04:33:08PM +0200, Peter Zijlstra wrote:
> >> > @@ -6145,6 +6183,9 @@ void perf_prepare_sample(struct perf_event_header *header,
> >> >
> >> > header->size += size;
> >> > }
> >> > +
> >> > + if (sample_type & PERF_SAMPLE_PHYS_ADDR)
> >> > + data->phys_addr = perf_virt_to_phys(data->addr);
> >>
> >> Only problem with this now is that it requires SAMPLE_ADDR to also be
> >> set in order to obtain data->addr.
> >>
> >> Either fix all to set data->attr for (SAMPLE_ADDR || SAMPLE_PHYS_ADDR)
> >> or mandate SAMPLE_ADDR when SAMPLE_PHYS_ADDR.
> >
> > I think the former suggestion is better, as it allows for smaller
> > samples.
>
> Agreed. I may only care about physical addresses, so SAMPLE_PHYS_ADDR
> should suffice from the user.
> The kernel must save the virtual address in data->addr, and then convert it.
Stephane, have you took the time to test this together with Kan's latest
patchkit for tools/perf? v2? If so can I have your Tested-by or just an
Acked-by?
Thanks,
- Arnaldo
next prev parent reply other threads:[~2017-08-31 16:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 14:22 [PATCH V6] perf: Add PERF_SAMPLE_PHYS_ADDR kan.liang
2017-08-23 14:33 ` Peter Zijlstra
2017-08-23 14:39 ` Peter Zijlstra
2017-08-23 17:00 ` Stephane Eranian
2017-08-31 16:44 ` Arnaldo Carvalho de Melo [this message]
2017-08-23 18:01 ` Liang, Kan
2017-08-23 18:26 ` Peter Zijlstra
2017-08-24 1:26 ` Michael Ellerman
2017-08-24 8:56 ` Peter Zijlstra
2017-08-24 9:52 ` Michael Ellerman
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=20170831164437.GJ4831@kernel.org \
--to=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maddy@linux.vnet.ibm.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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.