From: William C. <wc...@re...> - 2015-01-28 22:30:58
|
On 01/28/2015 03:47 PM, Xin Tong wrote: > does perf has anything to do with operf ? > > Xin Hi Xin, The names are similar but they are different tools. perf is a tool developed by kernel engineers. operf is a tool in the oprofile. They both are using the same underlying linux kernel perf support to access the performance monitoring hardware, but store their data in different formats and have different options. -Will > > On Tue, Jan 27, 2015 at 9:03 PM, William Cohen <wc...@re... <mailto:wc...@re...>> wrote: > > On 01/27/2015 06:51 PM, Xin Tong wrote: > > what does perf do ? is it a different tool from operf ? the perf command generates perf.data and i do not need to tell it what performance counters i want to collect ? > > > > bash-4.1$ perf record --pid=44637 > > 755 root 39 19 0 0 0 R 100.0 0.0 14085:51 kipmi0 > > 44637 xintong1 20 0 3928 344 268 R 100.0 0.0 0:37.75 loop > > Hi Xin, > > perf is a tools that is included in the kernel source that also uses the performance monitoring hardware like operf. Most newer linux distributions also package the perf executables in a package. By default it uses cycles as the thing sampling metric. Assuming that you have perf installed on the machine you can do record some data with the following (hit cntl-c to stop data recording) > > $ perf record --pid=44637 > > This will record data in perf.data in the directory. The use the following to look at the data > > $ perf report > > The following URL has more information about perf: > > http://web.eece.maine.edu/~vweaver/projects/perf_events/ > > -Will > |