perf sort: Add sort option for physical address
Add a new sort option "phys_daddr" for --mem-mode sort. With this option applied, perf can sort and report by sample's physical address. Signed-off-by: Kan Liang <kan.liang@intel.com> Tested-by: Jiri Olsa <jolsa@redhat.com> Acked-by: Stephane Eranian <eranian@google.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1504026672-7304-3-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
3b0a5daa06
commit
8780fb25ab
@@ -1635,10 +1635,12 @@ static void ip__resolve_ams(struct thread *thread,
|
||||
ams->al_addr = al.addr;
|
||||
ams->sym = al.sym;
|
||||
ams->map = al.map;
|
||||
ams->phys_addr = 0;
|
||||
}
|
||||
|
||||
static void ip__resolve_data(struct thread *thread,
|
||||
u8 m, struct addr_map_symbol *ams, u64 addr)
|
||||
u8 m, struct addr_map_symbol *ams,
|
||||
u64 addr, u64 phys_addr)
|
||||
{
|
||||
struct addr_location al;
|
||||
|
||||
@@ -1658,6 +1660,7 @@ static void ip__resolve_data(struct thread *thread,
|
||||
ams->al_addr = al.addr;
|
||||
ams->sym = al.sym;
|
||||
ams->map = al.map;
|
||||
ams->phys_addr = phys_addr;
|
||||
}
|
||||
|
||||
struct mem_info *sample__resolve_mem(struct perf_sample *sample,
|
||||
@@ -1669,7 +1672,8 @@ struct mem_info *sample__resolve_mem(struct perf_sample *sample,
|
||||
return NULL;
|
||||
|
||||
ip__resolve_ams(al->thread, &mi->iaddr, sample->ip);
|
||||
ip__resolve_data(al->thread, al->cpumode, &mi->daddr, sample->addr);
|
||||
ip__resolve_data(al->thread, al->cpumode, &mi->daddr,
|
||||
sample->addr, sample->phys_addr);
|
||||
mi->data_src.val = sample->data_src;
|
||||
|
||||
return mi;
|
||||
|
Reference in New Issue
Block a user