linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libperf: CPU map question
@ 2022-02-14 16:54 Tzvetomir Stoyanov
  2022-02-14 19:51 ` Arnaldo Carvalho de Melo
  2022-02-14 21:22 ` Jiri Olsa
  0 siblings, 2 replies; 5+ messages in thread
From: Tzvetomir Stoyanov @ 2022-02-14 16:54 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, linux-perf-users

Hello,
I'm trying to use libperf as an interface to perf from an application,
but I face some difficulties.  I cannot understand how perf_cpu_map_
APIs should be used. My use case is:
 I want to iterate over the CPUs from the map. I'm using
perf_evsel__cpus() API to get the map and perf_cpu_map__for_each_cpu()
macros to iterate over the map. However, using that logic I get a
struct perf_cpu for each CPU from the map. That structure seems to be
private and I cannot access the actual .cpu id. Am I missing something
?
Will be glad for any help and clarification.

Thanks!
-- 
Tzvetomir (Ceco) Stoyanov
VMware Open Source Technology Center

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-15  4:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-14 16:54 libperf: CPU map question Tzvetomir Stoyanov
2022-02-14 19:51 ` Arnaldo Carvalho de Melo
2022-02-14 21:22 ` Jiri Olsa
2022-02-14 22:18   ` Ian Rogers
2022-02-15  4:46     ` Tzvetomir Stoyanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).