[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-091a4ef5a94d46d26a05f0c32d2f64800ed91306@git.kernel.org>
Date: Mon, 4 Nov 2013 12:21:20 -0800
From: tip-bot for Adrian Hunter <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, eranian@...gle.com, mingo@...hat.com,
mingo@...nel.org, a.p.zijlstra@...llo.nl, efault@....de,
jolsa@...hat.com, fweisbec@...il.com, dsahern@...il.com,
tglx@...utronix.de, hpa@...or.com, paulus@...ba.org,
linux-kernel@...r.kernel.org, andi@...stfloor.org,
namhyung@...il.com, adrian.hunter@...el.com
Subject: [tip:perf/core] perf test: Update "sample parsing"
test for PERF_SAMPLE_TRANSACTION
Commit-ID: 091a4ef5a94d46d26a05f0c32d2f64800ed91306
Gitweb: http://git.kernel.org/tip/091a4ef5a94d46d26a05f0c32d2f64800ed91306
Author: Adrian Hunter <adrian.hunter@...el.com>
AuthorDate: Fri, 1 Nov 2013 15:51:37 +0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 4 Nov 2013 12:47:24 -0300
perf test: Update "sample parsing" test for PERF_SAMPLE_TRANSACTION
In fact the "sample parsing" test does not automatically check new
sample type bits - they must be added to the comparison logic.
Doing that shows that the test fails because the functions
perf_event__synthesize_sample() and perf_event__sample_event_size() have
not been updated with PERF_SAMPLE_TRANSACTION either.
Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Mike Galbraith <efault@....de>
Cc: Namhyung Kim <namhyung@...il.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/r/1383313899-15987-10-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/tests/sample-parsing.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c
index 61c9da2..1b67720 100644
--- a/tools/perf/tests/sample-parsing.c
+++ b/tools/perf/tests/sample-parsing.c
@@ -121,6 +121,9 @@ static bool samples_same(const struct perf_sample *s1,
if (type & PERF_SAMPLE_DATA_SRC)
COMP(data_src);
+ if (type & PERF_SAMPLE_TRANSACTION)
+ COMP(transaction);
+
return true;
}
@@ -165,6 +168,7 @@ static int do_test(u64 sample_type, u64 sample_regs_user, u64 read_format)
.cpu = 110,
.raw_size = sizeof(raw_data),
.data_src = 111,
+ .transaction = 112,
.raw_data = (void *)raw_data,
.callchain = &callchain.callchain,
.branch_stack = &branch_stack.branch_stack,
@@ -273,7 +277,8 @@ int test__sample_parsing(void)
/*
* Fail the test if it has not been updated when new sample format bits
- * were added.
+ * were added. Please actually update the test rather than just change
+ * the condition below.
*/
if (PERF_SAMPLE_MAX > PERF_SAMPLE_TRANSACTION << 1) {
pr_debug("sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating\n");
--
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