From: David Ahern <dsahern@gmail.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org
Subject: Re: [PATCH] perf record: fix fallback to cpu-clock on ppc
Date: Tue, 08 May 2012 08:10:23 -0600 [thread overview]
Message-ID: <4FA9294F.7070203@gmail.com> (raw)
In-Reply-To: <20120508131207.GG2485@infradead.org>
On 5/8/12 7:12 AM, Arnaldo Carvalho de Melo wrote:
> Em Mon, May 07, 2012 at 10:40:04PM -0600, David Ahern escreveu:
>> perf-record on PPC is not falling back to cpu-clock:
>>
>> Old kernel, cannot exclude guest or host samples.
>>
>> Error: sys_perf_event_open() syscall returned with 6 (No such device or address). /bin/dmesg may provide additional information.
>>
>> Fatal: No CONFIG_PERF_EVENTS=y kernel support configured?
>>
>> The problem is that until 2.6.37 (behavior changed with commit b0a873e)
>> perf on PPC returns ENXIO when hw_perf_event_init() fails. With this
>> patch we get the expected behavior:
>>
>> Old kernel, cannot exclude guest or host samples.
>> The cycles event is not supported, trying to fall back to cpu-clock-ticks
>> [ perf record: Woken up 1 times to write data ]
>> [ perf record: Captured and wrote 0.150 MB /tmp/perf.data (~6569 samples) ]
>
> Would be good to have this documented on the spot, i.e. just before that
> if.
>
> Also, have you checked that 'perf stat' and 'perf top' works as well? We
> really need to move all this logic to a central place, namely
> perf_evlist__open().
>
> For now checking if stat and top ara ok should be enough.
perf-top works because it drops back to cpu-clock for any
perf_event_open failure; perf-stat does not. Will fix it and add a
comment about PPC and ENXIO errno to both.
David
next prev parent reply other threads:[~2012-05-08 14:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 4:40 [PATCH] perf record: fix fallback to cpu-clock on ppc David Ahern
2012-05-08 13:12 ` Arnaldo Carvalho de Melo
2012-05-08 14:10 ` David Ahern [this message]
2012-05-09 14:56 ` Arnaldo Carvalho de Melo
2012-05-09 16:22 ` David Ahern
2012-05-09 17:16 ` Arnaldo Carvalho de Melo
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=4FA9294F.7070203@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--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.