From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: "peterz@infradead.org" <peterz@infradead.org>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Vineet.Gupta1@synopsys.com" <Vineet.Gupta1@synopsys.com>,
"arc-linux-dev@synopsys.com" <arc-linux-dev@synopsys.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"acme@kernel.org" <acme@kernel.org>
Subject: Re: [PATCH v3 3/6] ARCv2: perf: Support sampling events using overflow interrupts
Date: Wed, 26 Aug 2015 13:21:08 +0000 [thread overview]
Message-ID: <1440595268.15478.47.camel@synopsys.com> (raw)
In-Reply-To: <20150826131225.GD19282@twins.programming.kicks-ass.net>
Hi Peter,
On Wed, 2015-08-26 at 15:12 +0200, Peter Zijlstra wrote:
> On Mon, Aug 24, 2015 at 05:20:20PM +0300, Alexey Brodkin wrote:
> > @@ -295,6 +317,16 @@ static int arc_pmu_add(struct perf_event *event, int flags)
> > }
> >
> > write_aux_reg(ARC_REG_PCT_INDEX, idx);
> > +
> > + arc_pmu->act_counter[idx] = event;
> > +
> > + if (is_sampling_event(event)) {
> > + /* Mimic full counter overflow as other arches do */
> > + write_aux_reg(ARC_REG_PCT_INT_CNTL, (u32)arc_pmu->max_period);
> > + write_aux_reg(ARC_REG_PCT_INT_CNTH,
> > + (arc_pmu->max_period >> 32));
> > + }
> > +
>
> pmu::add should call pmu::start when PERF_EF_START, without that it
> should not start the counter, only schedule it.
>
> (although currently all pmu::add() calls will have EF_START set)
And that's what we do, don't we?
----------------------->8-----------------------
if (flags & PERF_EF_START)
arc_pmu_start(event, PERF_EF_RELOAD);
----------------------->8-----------------------
-Alexey
next prev parent reply other threads:[~2015-08-26 13:21 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 [this message]
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
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=1440595268.15478.47.camel@synopsys.com \
--to=alexey.brodkin@synopsys.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=acme@kernel.org \
--cc=arc-linux-dev@synopsys.com \
--cc=arnd@arndb.de \
--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).