From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Wang Nan <wangnan0@huawei.com>, David Ahern <dsahern@gmail.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3 20/37] perf script: Add 'synth' event type for synthesized events
Date: Thu, 22 Jun 2017 11:59:30 -0300 [thread overview]
Message-ID: <20170622145930.GS13640@kernel.org> (raw)
In-Reply-To: <0d5f93ef-f5c9-5185-c1f6-f176f8f533ea@intel.com>
Em Wed, Jun 21, 2017 at 11:20:03PM +0300, Adrian Hunter escreveu:
> On 06/21/2017 08:29 PM, Arnaldo Carvalho de Melo wrote:
> > Em Wed, Jun 21, 2017 at 07:41:04PM +0300, Adrian Hunter escreveu:
> >> PERF_TYPE_ is dynamically allocated above PERF_TYPE_MAX for PMUs. Presently
> >> perf_pmu_register() calls idr_alloc() with end=0 which limits the allocation
> >> to INT_MAX.
> > Oh, forgot about that, guess a comment right beside PERF_TYPE_MAX is in
> > demand :-\
> > So why not:
> > /*
> > * PERF_TYPE_ is dynamically allocated above PERF_TYPE_MAX for PMUs. Presently
> > * perf_pmu_register() calls idr_alloc() with end=0 which limits the allocation
> > * to INT_MAX.
> > */
> > #define PERF_TYPE_SYNTH (INT_MAX + 1L)
> > I.e. wouldn't be some arbitrarily huge value, but one right after what
> > was defined as the area for the dynamicly allocated PERF_TYPE_
> > "namespace" for PMUs, right?
> That seems fine. Pedantically it should be (INT_MAX + 1U) otherwise it will
> be negative on a 32-bit system.
oh, not pedantic at all, thanks for the fix, will update your patch and
continue from there, Ingo already pulled everything up to this point,
btw.
- Arnaldo
prev parent reply other threads:[~2017-06-22 14:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1495786658-18063-21-git-send-email-adrian.hunter@intel.com>
[not found] ` <1498040239-32418-1-git-send-email-adrian.hunter@intel.com>
2017-06-21 13:51 ` [PATCH V3 20/37] perf script: Add 'synth' event type for synthesized events Arnaldo Carvalho de Melo
2017-06-21 16:41 ` Adrian Hunter
2017-06-21 17:29 ` Arnaldo Carvalho de Melo
2017-06-21 20:20 ` Adrian Hunter
2017-06-22 14:59 ` Arnaldo Carvalho de Melo [this message]
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=20170622145930.GS13640@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=wangnan0@huawei.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).