d7d4f372da1db4d558701a1ddf96f82f0c6bd2cb
[vpp.git] / src / plugins / perfmon / CMakeLists.txt
1 # Copyright (c) 2020 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*|aarch64.*")
15   return()
16 endif()
17
18 if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
19   list(APPEND ARCH_PMU_SOURCES
20     intel/dispatch_wrapper.c
21     intel/core.c
22     intel/uncore.c
23     intel/bundle/backend_bound_core.c
24     intel/bundle/backend_bound_mem.c
25     intel/bundle/branch_mispred.c
26     intel/bundle/cache_hit_miss.c
27     intel/bundle/frontend_bound_bw_src.c
28     intel/bundle/frontend_bound_bw_uops.c
29     intel/bundle/frontend_bound_lat.c
30     intel/bundle/iio_bw.c
31     intel/bundle/inst_and_clock.c
32     intel/bundle/load_blocks.c
33     intel/bundle/mem_bw.c
34     intel/bundle/power_license.c
35     intel/bundle/topdown_icelake.c
36     intel/bundle/topdown_metrics.c
37     intel/bundle/topdown_tremont.c
38   )
39 endif()
40
41 if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64.*")
42   list(APPEND ARCH_PMU_SOURCES
43     arm/dispatch_wrapper.c
44     arm/events.c
45   )
46 endif()
47
48 add_vpp_plugin(perfmon
49   SOURCES
50   cli.c
51   linux.c
52   perfmon.c
53   ${ARCH_PMU_SOURCES}
54
55   COMPONENT
56   vpp-plugin-devtools
57 )