Question

I use "perf record ./exe",and it come up with the file "perf.data"; however, when I use "perf report" to check the data, it shows nothing ,why? my perf version is "0.0.2.PERF" and use Open suse Linux Enterprise Server 11 (x86_64).

and when I do the same thing in Ubuntu, it work well, is there any difference between Open suse and Ubuntu?

Was it helpful?

Solution

Yes the perf binaries in ubuntu and open suse are of different versions. You'd be better off compiling perf from it's source (if you have the privileges to install the dependencies, that is). perf in linus' tip are light-years away in term of features and bugfixes compared to the one in suse linux:

$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
<make coffee, or something>

$ cd linux/tools/perf
$ make prefix=/usr/local install install-man
<it will complain about missing libs here, if any, which you should be able
 to deduce the corresponding rpm packages to install them from>

As for perf learning sources - there are not enough of them IMHO. I started out by reading the perf tutorial at its wiki site. Then I skimmed through the perf-user mailing list via gmane. I found this post on off-box analysis by acme (of redhat fame) the most helpful for what I needed to do. You'd do well to skim through the perf user mailing list.

Lastly, I also skim through perf's git log messages to see features and fixes that people have been working on:

$ cd tools/perf
$ git log -- .
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top