perf: add arch-dependent get_num_counters function
Change-Id: I2230af87e0c764d97115e833dccb1842946c1b94 Fujitsu: POSTK_DEBUG_ARCH_DEP_109
This commit is contained in:
@@ -3768,9 +3768,10 @@ perf_counter_alloc(struct thread *thread)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
int i = 0;
|
||||
const int counters = ihk_mc_perf_get_num_counters();
|
||||
|
||||
// find avail generic counter
|
||||
for (i = 0; i < NUM_PERF_COUNTERS; i++) {
|
||||
for (i = 0; i < counters; i++) {
|
||||
if(!(thread->pmc_alloc_map & (1 << i))) {
|
||||
ret = i;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user