1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (C) 2005-2017 Andes Technology Corporation
11 char *get_cpuid_str(struct perf_pmu
*pmu
)
13 /* In nds32, we only have one cpu */
16 const char *sysfs
= sysfs__mountpoint();
18 if (!sysfs
|| !pmu
|| !pmu
->cpus
)
21 buf
= malloc(STR_LEN
);
25 cpus
= cpu_map__get(pmu
->cpus
);
26 sprintf(buf
, "0x%x", cpus
->nr
- 1);