[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160107082704.GE20434@krava.brq.redhat.com>
Date: Thu, 7 Jan 2016 09:27:04 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: kan.liang@...el.com
Cc: peterz@...radead.org, acme@...nel.org, eranian@...gle.com,
ak@...ux.intel.com, jolsa@...nel.org, namhyung@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/8] perf mem: report physical addresses
On Wed, Jan 06, 2016 at 06:04:34AM -0500, kan.liang@...el.com wrote:
> From: Kan Liang <kan.liang@...el.com>
>
> 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@...el.com>
> ---
> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists