On Fri, Jun 7, 2013 at 9:05 AM, David Ahern <dsah...@gmail.com> wrote:
>
> So perf record -v does not show the fallback? The default event has been
> 'cycles' from the beginning I believe. Only if cycles is not supported does
> it fallback to cpu-clock. You should not have to add '-e cycles'. Well, at
> least that is the way it is for the code in Linus' tree.

The perf record invocation I am using in the CentOS 6.4 VM is in the
form of `perf record -v -e event0,...eventN <command-to-trace>`, and
perf is built from 3.9.4 sources from kernel.org, and the running
kernel is built from the same sources. In this environment If I pass
events to -e without including cycles, I do not get the message about
falling back to cpu-clock. If I do include cycles in the event list,
or do not provide an event list at all, I do get the message about
falling back to cpu-clock.

Thank you for the clarification regarding -c and -F / sampling rate/period.

> What command lines are you running? I seem to recall this is a 2.6.32 kernel
> and basic perf record commands should work fine -- perf record -a or perf
> record -p <pid>. Perhaps something snuck in recently that broke compat with
> 2.6.32. You can determine that by running the perf command that comes with
> that version of Ubuntu and then newer ones -- 3.0, 3.4, 3.8 would be a good
> distribution of versions to start with if you want to get to the bottom of
> it.

You are correct that the Ubuntu 10.04 host that doesn't seem to be
recording properly is running a 2.6.32 kernel (2.6.32-47-server from
Ubuntu). The invocation of perf record is the same as described for
the CentOS VM (i.e. I am not using -p, and would like to not use -a,
though -a is the only way I'm getting samples recorded for
<command-to-trace>).

I had moved to building a newer version of perf than the one that came
from the Ubuntu 10.04 repo (linux-tools-common) because that one
appeared ancient based on the output it was generating, and reports
version as 0.0.2.PERF (though the binary is installed as
/usr/bin/perf_2.6.32-47). perf record does record data with that
version, but it looks like (via perf report) that it's data only for
one event even when multiple are passed, and that event isn't labeled
in the report, so at a glance I am not sure which it is.

Anyway, for now I'm not worrying about getting this working on this
particular version of Ubuntu, but I appreciate all your help. If I
decide to dig further I'll start iterating through the versions you
suggested and see where things get extra broken.

Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to