Make SamplingEventSource available on all platforms
This is going to make writing cross-platform code easier. Bug: 1248057 Change-Id: I6b1638415d234d8ba164852f89f2c5adb594fd6f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3573629 Reviewed-by: Francois Pierre Doray <fdoray@chromium.org> Commit-Queue: Patrick Monette <pmonette@chromium.org> Cr-Commit-Position: refs/heads/main@{#992357}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
74fa7b005e
commit
ec9b4e4ad3
@ -2,9 +2,16 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
if (is_mac) {
|
||||
static_library("power_metrics") {
|
||||
sources = [
|
||||
static_library("power_metrics") {
|
||||
sources = [
|
||||
"sampling_event_source.cc",
|
||||
"sampling_event_source.h",
|
||||
"timer_sampling_event_source.cc",
|
||||
"timer_sampling_event_source.h",
|
||||
]
|
||||
|
||||
if (is_mac) {
|
||||
sources += [
|
||||
"energy_impact_mac.h",
|
||||
"energy_impact_mac.mm",
|
||||
"iopm_power_source_sampling_event_source.cc",
|
||||
@ -17,34 +24,33 @@ if (is_mac) {
|
||||
"resource_coalition_internal_types_mac.h",
|
||||
"resource_coalition_mac.h",
|
||||
"resource_coalition_mac.mm",
|
||||
"sampling_event_source.cc",
|
||||
"sampling_event_source.h",
|
||||
"smc_internal_types_mac.h",
|
||||
"smc_mac.h",
|
||||
"smc_mac.mm",
|
||||
"timer_sampling_event_source.cc",
|
||||
"timer_sampling_event_source.h",
|
||||
]
|
||||
|
||||
deps = [ "//base" ]
|
||||
}
|
||||
|
||||
source_set("unit_tests") {
|
||||
testonly = true
|
||||
deps = [ "//base" ]
|
||||
}
|
||||
|
||||
sources = [
|
||||
source_set("unit_tests") {
|
||||
testonly = true
|
||||
|
||||
sources = [ "timer_sampling_event_source_unittest.cc" ]
|
||||
|
||||
deps = [
|
||||
":power_metrics",
|
||||
"//base",
|
||||
"//base/test:test_support",
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
if (is_mac) {
|
||||
sources += [
|
||||
"energy_impact_mac_unittest.mm",
|
||||
"resource_coalition_mac_unittest.mm",
|
||||
"timer_sampling_event_source_unittest.cc",
|
||||
]
|
||||
|
||||
data = [ "test/data/" ]
|
||||
|
||||
deps = [
|
||||
":power_metrics",
|
||||
"//base",
|
||||
"//base/test:test_support",
|
||||
"//testing/gtest",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user