On Tue, Aug 29, 2017 at 05:05:15PM +0530, Madhavan Srinivasan wrote:
> 
> 
> On Tuesday 29 August 2017 06:22 AM, [email protected] wrote:
> > From: Kan Liang <[email protected]>
> > 
> > For understanding how the workload maps to memory channels and hardware
> > behavior, it's very important to collect address maps with physical
> > addresses. For example, 3D XPoint access can only be found by filtering
> > the physical address.
> > 
> > Add a new sample type for physical address.
> > 
> > perf already has a facility to collect data virtual address. This patch
> > introduces a function to convert the virtual address to physical address.
> > The function is quite generic and can be extended to any architecture as
> > long as a virtual address is provided.
> >   - For kernel direct mapping addresses, virt_to_phys is used to convert
> >     the virtual addresses to physical address.
> >   - For user virtual addresses, __get_user_pages_fast is used to walk the
> >     pages tables for user physical address.
> >   - This does not work for vmalloc addresses right now. These are not
> >     resolved, but code to do that could be added.
> > 
> > The new sample type requires collecting the virtual address. The
> > virtual address will not be output unless SAMPLE_ADDR is applied.
> > 
> > For security, the physical address can only be exposed to root or
> > privileged user.
> 
> Tested-by: Madhavan Srinivasan <[email protected]>

Thanks maddy!

Reply via email to