From: Vineet Gupta <vgupta@synopsys.com>
To: Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"arc-linux-dev@synopsys.com" <arc-linux-dev@synopsys.com>,
"peterz@infradead.org" <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [PATCH v3 4/6] ARCv2: perf: implement exclusion of event counting in user or kernel mode
Date: Mon, 24 Aug 2015 22:08:22 +0530 [thread overview]
Message-ID: <55DB487E.5020409@synopsys.com> (raw)
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA23075CFB8557D@IN01WEMBXB.internal.synopsys.com>
On Monday 24 August 2015 08:00 PM, Vineet Gupta wrote:
> On Monday 24 August 2015 07:50 PM, Alexey Brodkin wrote:
>> > Cc: Peter Zijlstra <peterz@infradead.org>
>> > Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
>> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>> > ---
>> >
>> > No changes since v2.
>> >
>> > No changes since v1.
>> >
>> > ....
>> > }
>> >
>> > + hwc->config = 0;
>> > +
>> > + if (is_isa_arcv2()) {
>> > + /* "exclude user" means "count only kernel" */
>> > + if (event->attr.exclude_user)
>> > + hwc->config |= ARC_REG_PCT_CONFIG_KERN;
>> > +
>> > + /* "exclude kernel" means "count only user" */
>> > + if (event->attr.exclude_kernel)
>> > + hwc->config |= ARC_REG_PCT_CONFIG_USER;
>> > + }
>> > +
>> > switch (event->attr.type) {
>> > case PERF_TYPE_HARDWARE:
>> > if (event->attr.config >= PERF_COUNT_HW_MAX)
>> > return -ENOENT;
>> > if (arc_pmu->ev_hw_idx[event->attr.config] < 0)
>> > return -ENOENT;
>> > - hwc->config = arc_pmu->ev_hw_idx[event->attr.config];
>> > + hwc->config |= arc_pmu->ev_hw_idx[event->attr.config];
> With raw events patch dropped - this hunk need not be present.
Please ignore this stupid comment - this was written when I was presumably smoking
pot !
>
>> > pr_debug("init event %d with h/w %d \'%s\'\n",
>> > (int) event->attr.config, (int) hwc->config,
>> > arc_pmu_ev_hw_map[event->attr.config]);
>> > @@ -163,7 +175,7 @@ static int arc_pmu_event_init(struct perf_event *event)
>> > ret = arc_pmu_cache_event(event->attr.config);
>> > if (ret < 0)
>> > return ret;
>> > - hwc->config = arc_pmu->ev_hw_idx[ret];
>> > + hwc->config |= arc_pmu->ev_hw_idx[ret];
>> > return 0;
>> > default:
>> > return -ENOENT;
next prev parent reply other threads:[~2015-08-24 16:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 14:20 [PATCH v3 0/6] ARCv2 port to Linux - (C) perf Alexey Brodkin
2015-08-24 14:20 ` [PATCH v3 1/6] ARC: perf: cap the number of counters to hardware max of 32 Alexey Brodkin
2015-08-24 14:20 ` [PATCH v3 2/6] ARCv2: perf: implement "event_set_period" Alexey Brodkin
2015-08-24 14:20 ` Alexey Brodkin
2015-08-24 14:20 ` [PATCH v3 3/6] ARCv2: perf: Support sampling events using overflow interrupts Alexey Brodkin
2015-08-24 14:20 ` Alexey Brodkin
2015-08-26 13:07 ` Peter Zijlstra
2015-08-26 13:17 ` Alexey Brodkin
2015-08-26 14:35 ` Peter Zijlstra
2015-08-26 14:42 ` [arc-linux-dev] " Alexey Brodkin
2015-08-26 13:12 ` Peter Zijlstra
2015-08-26 13:21 ` Alexey Brodkin
2015-08-26 14:32 ` Peter Zijlstra
2015-08-26 14:35 ` Alexey Brodkin
2015-08-26 14:25 ` Peter Zijlstra
2015-10-19 10:01 ` perf documentation (was Re: [PATCH v3 3/6] ARCv2: perf: Support sampling events using overflow interrupts) Vineet Gupta
2015-10-19 10:12 ` Peter Zijlstra
2015-08-24 14:20 ` [PATCH v3 4/6] ARCv2: perf: implement exclusion of event counting in user or kernel mode Alexey Brodkin
2015-08-24 14:20 ` Alexey Brodkin
2015-08-24 14:30 ` Vineet Gupta
2015-08-24 16:38 ` Vineet Gupta [this message]
2015-08-24 14:20 ` [PATCH v3 5/6] ARCv2: perf: SMP support Alexey Brodkin
2015-08-24 14:20 ` Alexey Brodkin
2015-08-24 14:20 ` [PATCH v3 6/6] ARCv2: perf: Finally introduce HS perf unit Alexey Brodkin
2015-08-26 12:07 ` [PATCH v3 0/6] ARCv2 port to Linux - (C) perf Alexey Brodkin
2015-08-27 6:58 ` [arc-linux-dev] " Alexey Brodkin
2015-08-27 7:14 ` Vineet Gupta
2015-08-27 9:18 ` Peter Zijlstra
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=55DB487E.5020409@synopsys.com \
--to=vgupta@synopsys.com \
--cc=Alexey.Brodkin@synopsys.com \
--cc=acme@kernel.org \
--cc=arc-linux-dev@synopsys.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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).