2 // Copyright (c) 2010-2017 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 #ifndef _STATS_CORE_H_
18 #define _STATS_CORE_H_
22 struct lcore_stats_sample {
25 uint64_t mbm_tot_bytes;
26 uint64_t mbm_loc_bytes;
35 uint64_t mbm_tot_bytes;
36 uint64_t mbm_loc_bytes;
37 uint64_t cmt_fraction;
42 struct lcore_stats_sample sample[2];
45 uint32_t stats_lcore_find_stat_id(uint32_t lcore_id);
46 int stats_get_n_lcore_stats(void);
47 struct lcore_stats *stats_get_lcore_stats(uint32_t stat_id);
48 struct lcore_stats_sample *stats_get_lcore_stats_sample(uint32_t stat_id, int last);
49 int stats_cpu_freq_enabled(void);
50 int stats_cmt_enabled(void);
51 int stats_cat_enabled(void);
52 int stats_mbm_enabled(void);
53 void stats_lcore_update(void);
54 void stats_lcore_init(void);
55 void stats_lcore_post_proc(void);
56 void stats_update_cache_mask(uint32_t lcore_id, uint32_t mask);
57 void stats_lcore_assoc_rmid(void);
59 #endif /* _STATS_CORE_H_ */