diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-12-10 17:29:57 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-01-24 16:40:07 -0300 |
commit | f8ebb0cdf30fec2c2a5a364cdda8e6758a44026c (patch) | |
tree | 6478139f8d15c0aa300b4dc55877e3a03a54f1f8 /tools/perf/tests/builtin-test.c | |
parent | 66f97ed3ac44c24958171bbc5cc04896147752b7 (diff) | |
download | blackbird-obmc-linux-f8ebb0cdf30fec2c2a5a364cdda8e6758a44026c.tar.gz blackbird-obmc-linux-f8ebb0cdf30fec2c2a5a364cdda8e6758a44026c.zip |
perf test: Add a test case for hists__{match,link}
As they are used from diff and event group report, add a test case to
verify their behaviors.
In this test I made a fake machine and two evsel. Each evsel got 10
samples (so hist entries) - 5 are common and the rests are not. So
after hists__match() both of them will have 5 entries with pair set.
And the second evsel has a collapsed entry so that the total number is 9
- I made it in order to simulate more realistic case. Thus after
hists__link the first entry will have 14 entries - 5 are common (w/
pair), 5 are unmatch (w/o pair) and 4 are dummy (w/ pair). And the
second entry will have 9 entries all have its pair.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1355128197-18193-5-git-send-email-namhyung@kernel.org
[ committer note: fixed up clashes with cset that moved methods to machine.h ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/builtin-test.c')
-rw-r--r-- | tools/perf/tests/builtin-test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 186f67535494..479d10484a74 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -69,6 +69,10 @@ static struct test { .func = test__attr, }, { + .desc = "Test matching and linking mutliple hists", + .func = test__hists_link, + }, + { .func = NULL, }, }; |