Skip to content

Commit d44bc55

Browse files
ahunter6acmel
authored andcommitted
perf tests: Add a test for tracking with sched_switch
Add a test that checks that sched_switch events and tracking events can be recorded for a workload using the evsel->system_wide and evsel->tracking flags (respectively) with other events sometimes enabled or disabled. Signed-off-by: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] [ Fix build on fedora14 by using a designated initializer for the sched_switch variable ] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent f4536dd commit d44bc55

File tree

4 files changed

+578
-0
lines changed

4 files changed

+578
-0
lines changed

tools/perf/Makefile.perf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ endif
425425
endif
426426
LIB_OBJS += $(OUTPUT)tests/mmap-thread-lookup.o
427427
LIB_OBJS += $(OUTPUT)tests/thread-mg-share.o
428+
LIB_OBJS += $(OUTPUT)tests/switch-tracking.o
428429

429430
BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o
430431
BUILTIN_OBJS += $(OUTPUT)builtin-bench.o

tools/perf/tests/builtin-test.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ static struct test {
153153
.desc = "Test cumulation of child hist entries",
154154
.func = test__hists_cumulate,
155155
},
156+
{
157+
.desc = "Test tracking with sched_switch",
158+
.func = test__switch_tracking,
159+
},
156160
{
157161
.func = NULL,
158162
},

0 commit comments

Comments
 (0)