Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1303891

[PATCH V2 4/8] perf mem: add option phys-data to record physical address

From kan.liang@intel.com
Newsgroups linux.kernel
Subject [PATCH V2 4/8] perf mem: add option phys-data to record physical address
Date 2016-01-07 21:50 +0100
Message-ID <qOpFq-4Sh-35@gated-at.bofh.it> (permalink)
References <qOpFp-4Sh-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 1/8] perf: Add PERF_SAMPLE_PHYS_ADDR kan.liang@intel.com - 2016-01-07 21:50 +0100
  [PATCH V2 4/8] perf mem: add option phys-data to record physical address kan.liang@intel.com - 2016-01-07 21:50 +0100
  [PATCH V2 8/8] perf test: add test case for PERF_SAMPLE_PHYS_ADDR kan.liang@intel.com - 2016-01-07 22:00 +0100
  [PATCH V2 2/8] perf tools: add option to record sample physical address kan.liang@intel.com - 2016-01-07 22:00 +0100
  [PATCH V2 7/8] perf script: support physical addresses in script kan.liang@intel.com - 2016-01-07 22:00 +0100
  [PATCH V2 3/8] perf tools: add sort option phys_daddr kan.liang@intel.com - 2016-01-07 22:00 +0100
  Re: [PATCH V2 1/8] perf: Add PERF_SAMPLE_PHYS_ADDR kbuild test robot <lkp@intel.com> - 2016-01-07 22:20 +0100
  Re: [PATCH V2 1/8] perf: Add PERF_SAMPLE_PHYS_ADDR kbuild test robot <lkp@intel.com> - 2016-01-07 22:30 +0100

csiph-web