Skip to content

Commit

Permalink
perf tests: Add a test for tracking with sched_switch
Browse files Browse the repository at this point in the history
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 <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
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/1408129739-17368-2-git-send-email-adrian.hunter@intel.com
[ Fix build on fedora14 by using a designated initializer for the sched_switch variable ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Adrian Hunter authored and Arnaldo Carvalho de Melo committed Aug 22, 2014
1 parent f4536dd commit d44bc55
Show file tree
Hide file tree
Showing 4 changed files with 578 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/perf/Makefile.perf
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ endif
endif
LIB_OBJS += $(OUTPUT)tests/mmap-thread-lookup.o
LIB_OBJS += $(OUTPUT)tests/thread-mg-share.o
LIB_OBJS += $(OUTPUT)tests/switch-tracking.o

BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o
BUILTIN_OBJS += $(OUTPUT)builtin-bench.o
Expand Down
4 changes: 4 additions & 0 deletions tools/perf/tests/builtin-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ static struct test {
.desc = "Test cumulation of child hist entries",
.func = test__hists_cumulate,
},
{
.desc = "Test tracking with sched_switch",
.func = test__switch_tracking,
},
{
.func = NULL,
},
Expand Down
Loading

0 comments on commit d44bc55

Please sign in to comment.