Messages in this thread Patch in this message | | | From | kan.liang@intel ... | Subject | [PATCH V2 4/8] perf mem: add option phys-data to record physical address | Date | Thu, 7 Jan 2016 08:30:36 -0500 |
| |
From: Kan Liang <kan.liang@intel.com>
Add option phys-data in perf mem to record physical address
Signed-off-by: Kan Liang <kan.liang@intel.com> --- tools/perf/builtin-mem.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c index 3901700..7d5ff3a 100644 --- a/tools/perf/builtin-mem.c +++ b/tools/perf/builtin-mem.c @@ -16,6 +16,7 @@ struct perf_mem { bool hide_unresolved; bool dump_raw; bool force; + bool phys_addr; int operation; const char *cpu_list; DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS); @@ -39,6 +40,9 @@ static int __cmd_record(int argc, const char **argv, struct perf_mem *mem) rec_argv[i++] = "-d"; + if (mem->phys_addr) + rec_argv[i++] = "--phys-data"; + if (mem->operation & MEM_OPERATION_LOAD) { rec_argv[i++] = "-e"; rec_argv[i++] = "cpu/mem-loads/pp"; @@ -290,6 +294,7 @@ int cmd_mem(int argc, const char **argv, const char *prefix __maybe_unused) "separator for columns, no spaces will be added" " between columns '.' is reserved."), OPT_BOOLEAN('f', "force", &mem.force, "don't complain, do it"), + OPT_BOOLEAN('p', "phys-data", &mem.phys_addr, "Record sample physical addresses"), OPT_END() }; const char *const mem_subcommands[] = { "record", "report", NULL }; -- 1.8.3.1
| |