lkml.org 
[lkml]   [2017]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V6] perf: Add PERF_SAMPLE_PHYS_ADDR
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.

\
 
 \ /
  Last update: 2017-08-23 16:40    [W:0.113 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site