OSDN Git Service

simpleperf: exclude kernel callchains when needed.
authorYabin Cui <yabinc@google.com>
Mon, 24 Jul 2017 21:59:46 +0000 (14:59 -0700)
committerYabin Cui <yabinc@google.com>
Mon, 24 Jul 2017 21:59:46 +0000 (14:59 -0700)
commitd3cb3b0c50211ad68459d526fcc32eb11b8f26a5
tree027116325b25ecb2552e34122529adf07524801d
parent239663cf9757485fb723e17b10be5c6b12706bd7
simpleperf: exclude kernel callchains when needed.

Exclude kernel callchains when users only monitor events in user space.
After this change, when users use `record -e cpu-cycles:u --trace-offcpu`,
the samples of the implicitly added sched:sched_switch event won't contain
any kernel callchain.

Bug: http://b/37572306
Test: run simpleperf_unit_test.
Change-Id: Iffcb61bac796e734825e68f847f24b4006b44360
simpleperf/cmd_record.cpp
simpleperf/cmd_report.cpp
simpleperf/cmd_report_test.cpp
simpleperf/event_selection_set.cpp
simpleperf/event_selection_set.h
simpleperf/record.cpp
simpleperf/record.h
simpleperf/record_test.cpp