From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Rob Herring <robh@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Jiri Olsa <jolsa@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Will Deacon <will@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Namhyung Kim <namhyung@kernel.org>,
Itaru Kitayama <itaru.kitayama@gmail.com>
Subject: Re: [PATCH v7 2/4] libperf: Add evsel mmap support
Date: Wed, 14 Apr 2021 07:22:19 -0300 [thread overview]
Message-ID: <YHbCWytH5ek0C/an@kernel.org> (raw)
In-Reply-To: <CAL_JsqJfCNuvavU1xVUBxRFDopfsLW+E0kZXH8oZ2pmCDybPpA@mail.gmail.com>
Em Tue, Apr 13, 2021 at 02:07:57PM -0500, Rob Herring escreveu:
> On Tue, Apr 13, 2021 at 1:39 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > --- a/tools/lib/perf/evsel.c
> > > +int perf_evsel__mmap(struct perf_evsel *evsel, int pages)
> > > +{
> > > + int ret, cpu, thread;
> > Where is the counterpart?
>
> I was assuming implicitly unmapped when closing the fd(s), but looks
> like it's when exiting the process only.
>
> I.e. perf_evsel__munmap(), and it should be
> > called if perf_evsel__mmap() fails, right?
>
> If perf_evsel__mmap() fails, the caller shouldn't have to do anything
> WRT mmap, right? But if the perf_mmap__mmap() call fails, we do need
> some internal clean-up. I'll fix both.
You're right, thanks!
- Arnaldo
next prev parent reply other threads:[~2021-04-14 10:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 17:16 [PATCH v7 0/4] libperf userspace counter access Rob Herring
2021-04-13 17:16 ` [PATCH v7 1/4] tools/include: Add an initial math64.h Rob Herring
2021-04-13 17:16 ` [PATCH v7 2/4] libperf: Add evsel mmap support Rob Herring
2021-04-13 18:39 ` Arnaldo Carvalho de Melo
2021-04-13 19:07 ` Rob Herring
2021-04-14 10:22 ` Arnaldo Carvalho de Melo [this message]
2021-04-13 17:16 ` [PATCH v7 3/4] libperf: tests: Add support for verbose printing Rob Herring
2021-04-13 18:49 ` Arnaldo Carvalho de Melo
2021-04-13 19:02 ` Arnaldo Carvalho de Melo
2021-04-13 17:16 ` [PATCH v7 4/4] libperf: Add support for user space counter access Rob Herring
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=YHbCWytH5ek0C/an@kernel.org \
--to=acme@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=itaru.kitayama@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=will@kernel.org \
/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).