perf: add arch-dependent counter_mask_check function

A later version would probably want to check some mask for arm64...

Change-Id: I67e13a852c3ed406fbf8ae1688539b9e069c0e81
Fujitsu: POSTK_DEBUG_ARCH_DEP_87
This commit is contained in:
Dominique Martinet
2019-01-29 11:38:48 +09:00
parent 03cadbcba2
commit 238f563e88
4 changed files with 21 additions and 12 deletions

View File

@ -184,6 +184,11 @@ int ihk_mc_perfctr_fixed_init(int counter, int mode)
return -1;
}
int ihk_mc_perf_counter_mask_check(unsigned long counter_mask)
{
return 1;
}
int ihk_mc_perf_get_num_counters(void)
{
return cpu_pmu.per_cpu[ihk_mc_get_processor_id()].num_events;

View File

@ -499,6 +499,15 @@ int ihk_mc_perfctr_alloc_counter(unsigned int *type, unsigned long *config, unsi
return ret;
}
int ihk_mc_perf_counter_mask_check(unsigned long counter_mask)
{
if ((counter_mask & PERF_COUNTERS_MASK) |
(counter_mask & FIXED_PERF_COUNTERS_MASK)) {
return 1;
}
return 0;
}
int ihk_mc_perf_get_num_counters(void)
{
return NUM_PERF_COUNTERS;