public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vineet.Gupta1@synopsys.com, arc-linux-dev@synopsys.com,
	arnd@arndb.de, Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [PATCH v3 3/6] ARCv2: perf: Support sampling events using overflow interrupts
Date: Wed, 26 Aug 2015 15:12:25 +0200	[thread overview]
Message-ID: <20150826131225.GD19282@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1440426023-2792-4-git-send-email-abrodkin@synopsys.com>

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)

>  	write_aux_reg(ARC_REG_PCT_CONFIG, 0);
>  	write_aux_reg(ARC_REG_PCT_COUNTL, 0);
>  	write_aux_reg(ARC_REG_PCT_COUNTH, 0);



  parent reply	other threads:[~2015-08-26 13:12 UTC|newest]

Thread overview: 24+ 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 ` [PATCH v3 3/6] ARCv2: perf: Support sampling events using overflow interrupts 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 [this message]
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: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 ` [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=20150826131225.GD19282@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=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 \
    /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