From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>, linux-perf-users@vger.kernel.org
Subject: Re: libperf: CPU map question
Date: Mon, 14 Feb 2022 16:51:41 -0300 [thread overview]
Message-ID: <Ygqyze02nC5eaEBt@kernel.org> (raw)
In-Reply-To: <CAPpZLN6+BPu=Y_iCXBV_Uqg_mcY2LEBtg+_7r+oJqWkG8pNSGA@mail.gmail.com>
Em Mon, Feb 14, 2022 at 06:54:38PM +0200, Tzvetomir Stoyanov escreveu:
> 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.
Jiri, can you help?
- Arnaldo
next prev parent reply other threads:[~2022-02-14 20:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 16:54 libperf: CPU map question Tzvetomir Stoyanov
2022-02-14 19:51 ` Arnaldo Carvalho de Melo [this message]
2022-02-14 21:22 ` Jiri Olsa
2022-02-14 22:18 ` Ian Rogers
2022-02-15 4:46 ` Tzvetomir Stoyanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ygqyze02nC5eaEBt@kernel.org \
--to=acme@kernel.org \
--cc=jolsa@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=tz.stoyanov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).