Commit b55ae0a9 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf tests: Add test for reading object code

Using the information in mmap events, perf tools can read object code
associated with sampled addresses.  A test is added that compares bytes
read by perf with the same bytes read using objdump.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1375875537-4509-2-git-send-email-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 3445432b
...@@ -392,6 +392,7 @@ LIB_OBJS += $(OUTPUT)tests/sw-clock.o ...@@ -392,6 +392,7 @@ LIB_OBJS += $(OUTPUT)tests/sw-clock.o
ifeq ($(ARCH),x86) ifeq ($(ARCH),x86)
LIB_OBJS += $(OUTPUT)tests/perf-time-to-tsc.o LIB_OBJS += $(OUTPUT)tests/perf-time-to-tsc.o
endif endif
LIB_OBJS += $(OUTPUT)tests/code-reading.o
BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o
BUILTIN_OBJS += $(OUTPUT)builtin-bench.o BUILTIN_OBJS += $(OUTPUT)builtin-bench.o
......
...@@ -99,6 +99,10 @@ static struct test { ...@@ -99,6 +99,10 @@ static struct test {
.func = test__perf_time_to_tsc, .func = test__perf_time_to_tsc,
}, },
#endif #endif
{
.desc = "Test object code reading",
.func = test__code_reading,
},
{ {
.func = NULL, .func = NULL,
}, },
......
This diff is collapsed.
...@@ -36,5 +36,6 @@ int test__bp_signal_overflow(void); ...@@ -36,5 +36,6 @@ int test__bp_signal_overflow(void);
int test__task_exit(void); int test__task_exit(void);
int test__sw_clock_freq(void); int test__sw_clock_freq(void);
int test__perf_time_to_tsc(void); int test__perf_time_to_tsc(void);
int test__code_reading(void);
#endif /* TESTS_H */ #endif /* TESTS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment