From: Peter Zijlstra <peterz@infradead.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
linux-kernel@vger.kernel.org, David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Mike Galbraith <efault@gmx.de>, Namhyung Kim <namhyung@gmail.com>,
Paul Mackerras <paulus@samba.org>,
Stephane Eranian <eranian@google.com>
Subject: Re: [BUG] perf tests: Test converting perf time to TSC
Date: Thu, 3 Oct 2013 10:56:25 +0200 [thread overview]
Message-ID: <20131003085625.GA3081@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <524D2E06.5020801@intel.com>
On Thu, Oct 03, 2013 at 11:42:46AM +0300, Adrian Hunter wrote:
> On 03/10/13 11:17, Jiri Olsa wrote:
> > On Wed, Oct 02, 2013 at 04:46:59PM +0300, Adrian Hunter wrote:
> >> On 02/10/13 16:23, Jiri Olsa wrote:
> >>> hi,
> >>> got a segfault in the tsc test on latest acme's tree.
> >>>
> >>> I'm dealing with some other issues right now, so just reporting ;-)
> >>
> >> The capability bits have changed positions. You need to have:
> >>
> >> commit fa7315871046b9a4c48627905691dbde57e51033
> >> Author: Peter Zijlstra <peterz@infradead.org>
> >> Date: Thu Sep 19 10:16:42 2013 +0200
> >>
> >> perf: Fix capabilities bitfield compatibility in 'struct
> >> perf_event_mmap_page'
> >
> > ok, I'll try that.. but anyway, the test should
> > not crash in account of missing kernel change
>
> No the ABI is broken in that case - better to crash.
No; neither case should crash.
Anyway; looking at this, why does time_zero have these different checks
from the other time bits?
@@ -1897,6 +1898,11 @@ void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now)
userpg->time_mult = this_cpu_read(cyc2ns);
userpg->time_shift = CYC2NS_SCALE_FACTOR;
userpg->time_offset = this_cpu_read(cyc2ns_offset) - now;
+
+ if (sched_clock_stable && !check_tsc_disabled()) {
+ userpg->cap_usr_time_zero = 1;
+ userpg->time_zero = this_cpu_read(cyc2ns_offset);
+ }
}
That doesn't make any kind of sense.. why is cyc2ns_offset differently
tested from cyc2ns itself?
next prev parent reply other threads:[~2013-10-03 8:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-02 13:23 [BUG] perf tests: Test converting perf time to TSC Jiri Olsa
2013-10-02 13:46 ` Adrian Hunter
2013-10-02 16:14 ` Arnaldo Carvalho de Melo
2013-10-03 8:17 ` Jiri Olsa
2013-10-03 8:42 ` Adrian Hunter
2013-10-03 8:56 ` Peter Zijlstra [this message]
2013-10-03 8:58 ` Peter Zijlstra
2013-10-03 9:54 ` Adrian Hunter
2013-10-03 9:59 ` Peter Zijlstra
2013-10-03 10:13 ` Adrian Hunter
2013-10-03 11:02 ` Peter Zijlstra
2013-10-03 11:49 ` Adrian Hunter
2013-10-03 13:57 ` 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=20131003085625.GA3081@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@ghostprotocols.net \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=efault@gmx.de \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
--cc=paulus@samba.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