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


Groups > linux.kernel > #1302970

[PATCH 8/8] perf test: add test case for PERF_SAMPLE_PHYS_ADDR

From kan.liang@intel.com
Newsgroups linux.kernel
Subject [PATCH 8/8] perf test: add test case for PERF_SAMPLE_PHYS_ADDR
Date 2016-01-06 19:30 +0100
Message-ID <qO10n-4M5-45@gated-at.bofh.it> (permalink)
References <qO10l-4M5-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Extend sample-parsing test cases to support new sample type
PERF_SAMPLE_PHYS_ADDR.

Signed-off-by: Kan Liang <kan.liang@intel.com>
---
 tools/perf/tests/sample-parsing.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c
index 5f23710..8813fa1 100644
--- a/tools/perf/tests/sample-parsing.c
+++ b/tools/perf/tests/sample-parsing.c
@@ -45,6 +45,9 @@ static bool samples_same(const struct perf_sample *s1,
 	if (type & PERF_SAMPLE_ADDR)
 		COMP(addr);
 
+	if (type & PERF_SAMPLE_PHYS_ADDR)
+		COMP(phys_addr);
+
 	if (type & PERF_SAMPLE_ID)
 		COMP(id);
 
@@ -303,7 +306,7 @@ int test__sample_parsing(int subtest __maybe_unused)
 	 * were added.  Please actually update the test rather than just change
 	 * the condition below.
 	 */
-	if (PERF_SAMPLE_MAX > PERF_SAMPLE_REGS_INTR << 1) {
+	if (PERF_SAMPLE_MAX > PERF_SAMPLE_PHYS_ADDR << 1) {
 		pr_debug("sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating\n");
 		return -1;
 	}
-- 
1.8.3.1

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

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


Thread

[PATCH 1/8] perf: Add PERF_SAMPLE_PHYS_ADDR kan.liang@intel.com - 2016-01-06 19:30 +0100
  [PATCH 8/8] perf test: add test case for PERF_SAMPLE_PHYS_ADDR kan.liang@intel.com - 2016-01-06 19:30 +0100
  [PATCH 4/8] perf mem: add option phys-data to record physical address kan.liang@intel.com - 2016-01-06 19:30 +0100
  [PATCH 7/8] perf script: support physical addresses in script kan.liang@intel.com - 2016-01-06 19:30 +0100
    Re: [PATCH 7/8] perf script: support physical addresses in script Jiri Olsa <jolsa@redhat.com> - 2016-01-07 11:00 +0100
  Re: [PATCH 1/8] perf: Add PERF_SAMPLE_PHYS_ADDR Stephane Eranian <eranian@google.com> - 2016-01-06 20:30 +0100
  Re: [PATCH 1/8] perf: Add PERF_SAMPLE_PHYS_ADDR Jiri Olsa <jolsa@redhat.com> - 2016-01-07 09:40 +0100
    RE: [PATCH 1/8] perf: Add PERF_SAMPLE_PHYS_ADDR "Liang, Kan" <kan.liang@intel.com> - 2016-01-07 17:00 +0100
      Re: [PATCH 1/8] perf: Add PERF_SAMPLE_PHYS_ADDR Jiri Olsa <jolsa@redhat.com> - 2016-01-07 20:40 +0100
  Re: [PATCH 1/8] perf: Add PERF_SAMPLE_PHYS_ADDR Stephane Eranian <eranian@google.com> - 2016-01-07 23:00 +0100
    RE: [PATCH 1/8] perf: Add PERF_SAMPLE_PHYS_ADDR "Liang, Kan" <kan.liang@intel.com> - 2016-01-08 22:20 +0100

csiph-web