From: Oleg Nesterov <oleg@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@redhat.com>, Pratyush Anand <panand@redhat.com>,
Jeff Bastian <jbastian@redhat.com>,
Michael Petlan <mpetlan@redhat.com>,
linux-kernel@vger.kernel.org, arm-devel@redhat.com
Subject: Re: perf: wrong event->count report (Was: perf basic-test-aarch64 failures)
Date: Wed, 17 Feb 2016 20:34:42 +0100 [thread overview]
Message-ID: <20160217193442.GB14068@redhat.com> (raw)
In-Reply-To: <20160217102555.GZ6357@twins.programming.kicks-ass.net>
On 02/17, Peter Zijlstra wrote:
>
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -3173,6 +3173,10 @@ static void perf_event_enable_on_exec(in
>
> cpuctx = __get_cpu_context(ctx);
> perf_ctx_lock(cpuctx, ctx);
> +
> + update_context_time(ctx);
> + update_cgrp_time_from_cpuctx(cpuctx);
> +
Even if I don't really understand this change I agree, probably we need to update
the counters for enable_on_exec events somehow. But I don't see how this change can
make total_time_running == total_time_enabled.
And probably this is fine. In fact I do not understand why they should be equal.
I inserted printf() into perf_counts_values__scale() to verify that /usr/bin/perf
always sees count->run < count->ena even if I do, say,
# perf stat -x- -e module:module_load -a sleep 1
0--module:module_load-1007397333-100.00
the kernel reports run=1007397333 ena=1007397573. Close but not equal. Again, I
do not think this is wrong, I am only saying that I don't understand this logic
because this always means "scaled" for perf.
Nevermind, I never looked into tools/perf before, most probably I simply do not
understand it at all.
Oleg.
next prev parent reply other threads:[~2016-02-17 19:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160211093047.GA12115@dhcp-0-82.del.redhat.com>
[not found] ` <20160215070620.GA23850@dhcppc3.redhat.com>
2016-02-17 3:34 ` perf: wrong event->count report (Was: perf basic-test-aarch64 failures) Oleg Nesterov
2016-02-17 9:35 ` Jiri Olsa
2016-02-17 10:25 ` Peter Zijlstra
2016-02-17 14:44 ` Jiri Olsa
2016-02-17 14:56 ` Peter Zijlstra
2016-02-17 19:34 ` Oleg Nesterov [this message]
2016-02-17 19:43 ` Peter Zijlstra
2016-02-17 10:28 ` Peter Zijlstra
2016-02-17 10:31 ` Jiri Olsa
2016-02-17 19:18 ` Oleg Nesterov
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=20160217193442.GB14068@redhat.com \
--to=oleg@redhat.com \
--cc=arm-devel@redhat.com \
--cc=jbastian@redhat.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpetlan@redhat.com \
--cc=panand@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.