mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Tong Zhang <ztong@vt.edu>
Cc: Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] Perf: fix overwritten of free running PEBSv3 timestamp
Date: Thu, 11 Feb 2016 15:57:02 +0100	[thread overview]
Message-ID: <20160211145702.GK6357@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1455143882-3899-2-git-send-email-ztong@vt.edu>

On Wed, Feb 10, 2016 at 05:38:02PM -0500, Tong Zhang wrote:
>  commit a7b58d211ba18c9175b139e18b68c86a6bcc3c3f introduced feature of
>  timestamp on free running PEBSv3, however, the timestamp is later
>  overwritten, which makes the effort in vain.
> 
> This patch fixed this problem by detecting whether timestamp is provided.
> 
> Signed-off-by: Tong Zhang <ztong@vt.edu>
> ---
>  include/linux/perf_event.h  |  1 +
>  kernel/events/core.c        | 45 +++++++++++++++++++++++++++++++++------------
>  kernel/events/ring_buffer.c |  4 +++-
>  3 files changed, 37 insertions(+), 13 deletions(-)
> 
> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> index f9828a4..12d7b95 100644
> --- a/include/linux/perf_event.h
> +++ b/include/linux/perf_event.h
> @@ -815,6 +815,7 @@ static inline void perf_sample_data_init(struct perf_sample_data *data,
>  	data->weight = 0;
>  	data->data_src.val = PERF_MEM_NA;
>  	data->txn = 0;
> +	data->time = 0;
>  }

Argh, you just touched a new cacheline and made _every_ single event
slower.

  reply	other threads:[~2016-02-11 14:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 22:38 [PATCH 0/1] " Tong Zhang
2016-02-10 22:38 ` [PATCH 1/1] " Tong Zhang
2016-02-11 14:57   ` Peter Zijlstra [this message]
2016-02-11 16:39     ` Tong Zhang
2016-02-11 17:26       ` 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=20160211145702.GK6357@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=ztong@vt.edu \
    /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

Powered by JetHome