Re: [PATCH 5/8] perf mem: report physical addresses

From: Jiri Olsa
Date: Thu Jan 07 2016 - 03:27:17 EST


On Wed, Jan 06, 2016 at 06:04:34AM -0500, kan.liang@xxxxxxxxx wrote:
> From: Kan Liang <kan.liang@xxxxxxxxx>
>
> perf mem report should support physical addresses by applying -p or
> --phys-data. The default mem sort order for physical addresses is added
> accordingly.
>
> Signed-off-by: Kan Liang <kan.liang@xxxxxxxxx>
> ---
> tools/perf/builtin-mem.c | 15 +++++++++++----
> tools/perf/util/sort.c | 1 +
> tools/perf/util/sort.h | 1 +
> 3 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
> index 7d5ff3a..a81bdc2 100644
> --- a/tools/perf/builtin-mem.c
> +++ b/tools/perf/builtin-mem.c
> @@ -6,6 +6,7 @@
> #include "util/tool.h"
> #include "util/session.h"
> #include "util/data.h"
> +#include "util/sort.h"
>
> #define MEM_OPERATION_LOAD 0x1
> #define MEM_OPERATION_STORE 0x2
> @@ -176,9 +177,15 @@ static int report_events(int argc, const char **argv, struct perf_mem *mem)
> * there is no weight (cost) associated with stores, so don't print
> * the column
> */
> - if (!(mem->operation & MEM_OPERATION_LOAD))
> - rep_argv[i++] = "--sort=mem,sym,dso,symbol_daddr,"
> - "dso_daddr,tlb,locked";
> + if (!(mem->operation & MEM_OPERATION_LOAD)) {
> + if (mem->phys_addr)
> + rep_argv[i++] = "--sort=mem,sym,dso,symbol_daddr,"
> + "dso_daddr,tlb,locked,phys_daddr";
> + else
> + rep_argv[i++] = "--sort=mem,sym,dso,symbol_daddr,"
> + "dso_daddr,tlb,locked";
> + } else if (mem->phys_addr)
> + rep_argv[i++] = default_phys_mem_sort_order;

should this have "--sort=" as prefix ?

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/