From: Kan Liang <kan.li...@intel.com>

Add option phys-data in perf mem to record physical address

Signed-off-by: Kan Liang <kan.li...@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

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

Reply via email to