From: John Garry <john.garry@huawei.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, <will@kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <linuxarm@huawei.com>,
Ian Rogers <irogers@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] perf pmu: Improve CPU core PMU HW event list ordering
Date: Mon, 15 Jun 2020 15:51:19 +0100 [thread overview]
Message-ID: <7554ef7d-6d85-fa5f-2018-415f2260fa60@huawei.com> (raw)
In-Reply-To: <CAM9d7ciyOmzxUZ4dGJ12607rTnCCdNBbuQtv1gEmUe0FQJxELA@mail.gmail.com>
On 15/06/2020 15:36, Namhyung Kim wrote:>> static int cmp_sevent(const
void *a, const void *b)
>> @@ -1416,6 +1417,12 @@ static int cmp_sevent(const void *a, const void *b)
>> if (n)
>> return n;
>> }
>> +
>> + if (as->is_cpu && !bs->is_cpu)
>> + return -1;
>> + else if (!as->is_cpu && bs->is_cpu)
>> + return 1;
>> +
> This can be:
>
> if (as->is_cpu != bs->is_cpu)
> return bs->is_cpu - as->is_cpu;
>
That's more concise, but maybe not as readable at a glance. I don't mind
though, so can change.
Thanks,
John
parent reply other threads:[~2020-06-15 14:52 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CAM9d7ciyOmzxUZ4dGJ12607rTnCCdNBbuQtv1gEmUe0FQJxELA@mail.gmail.com>]
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=7554ef7d-6d85-fa5f-2018-415f2260fa60@huawei.com \
--to=john.garry@huawei.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®