public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead•org>
To: Sukadev Bhattiprolu <sukadev@linux•vnet.ibm.com>
Cc: linux-kernel@vger•kernel.org,
	Arnaldo Carvalho de Melo <acme@kernel•org>,
	mingo@redhat•com, Paul Mackerras <paulus@samba•org>,
	dev@codyps•com, linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH v2 3/5] perf: Rename perf_event_read_value
Date: Wed, 8 Apr 2015 14:24:59 +0200	[thread overview]
Message-ID: <20150408122459.GE23123@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1428453299-19121-4-git-send-email-sukadev@linux.vnet.ibm.com>

On Tue, Apr 07, 2015 at 05:34:57PM -0700, Sukadev Bhattiprolu wrote:
> perf_event_read_value() is mostly computing the event count and enabled/
> running times. Move the perf_event_read() into caller and rename
> perf_event_read_value() to perf_event_compute_values().
> 
> Changelog[v2]
> 	Export symbol perf_event_read() since x86/kvm needs it now.

FWIW these changed since last things go below the --- since they're
pointless for the permanent record.

> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux•vnet.ibm.com>
> ---
>  arch/x86/kvm/pmu.c         |    6 ++++--
>  include/linux/perf_event.h |    3 ++-
>  kernel/events/core.c       |   18 +++++++++++-------
>  3 files changed, 17 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c
> index 8e6b7d8..5896cb1 100644
> --- a/arch/x86/kvm/pmu.c
> +++ b/arch/x86/kvm/pmu.c
> @@ -144,9 +144,11 @@ static u64 read_pmc(struct kvm_pmc *pmc)
>  
>  	counter = pmc->counter;
>  
> -	if (pmc->perf_event)
> -		counter += perf_event_read_value(pmc->perf_event,
> +	if (pmc->perf_event) {
> +		perf_event_read(pmc->perf_event);
> +		counter += perf_event_compute_values(pmc->perf_event,
>  						 &enabled, &running);
> +	}

That's more than a rename, that's a functionality split just like the
previous patch.

  reply	other threads:[~2015-04-08 12:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08  0:34 [PATCH v2 0/5] perf: Implement event group read using txn interface Sukadev Bhattiprolu
2015-04-08  0:34 ` [PATCH v2 1/5] perf: Add a flags parameter to pmu txn interfaces Sukadev Bhattiprolu
2015-04-08 12:19   ` Peter Zijlstra
2015-04-08 15:40     ` Sukadev Bhattiprolu
2015-04-08  0:34 ` [PATCH v2 2/5] perf: Split perf_event_read() and perf_event_count() Sukadev Bhattiprolu
2015-04-08  0:34 ` [PATCH v2 3/5] perf: Rename perf_event_read_value Sukadev Bhattiprolu
2015-04-08 12:24   ` Peter Zijlstra [this message]
2015-04-08  0:34 ` [PATCH v2 4/5] perf: Define PMU_TXN_READ interface Sukadev Bhattiprolu
2015-04-08 12:45   ` Peter Zijlstra
2015-04-09 19:10     ` Sukadev Bhattiprolu
2015-04-08  0:34 ` [PATCH v2 5/5] powerpc/perf/hv-24x7: Use " Sukadev Bhattiprolu
2015-04-08 12:51   ` 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=20150408122459.GE23123@twins.programming.kicks-ass.net \
    --to=peterz@infradead$(echo .)org \
    --cc=acme@kernel$(echo .)org \
    --cc=dev@codyps$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mingo@redhat$(echo .)com \
    --cc=paulus@samba$(echo .)org \
    --cc=sukadev@linux$(echo .)vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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