Re: How to find all valid events for the CPU
Michael Petlan <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Organization | Red Hat |
| Message-ID | <1433425309.15036.332.camel@Rudolf-RHEL-7> |
On Thu, 2015-06-04 at 12:46 +0000, Mahmood N wrote: > >ocount -e CPU_CLK_UNHALTED,RETIRED_INSTRUCTIONS > There is no command called ocount Which version of oprofile do you have? Since ocount should have come in 0.9.8, you are probably using something even older... I highly recommend upgrading to 0.9.9 at least (note that 1.0 doesn't support opcontrol). You should use ocount instead of operf or opcontrol, because operf and opcontrol do profiling/sampling. It means that when 50000 (in your case) events occur, then one sample is created. That is good for profiling, so you know which parts of your program are the most CPU consuming or inefficient in any other way, but not for counting IPC. The ocount tool just counts all the events, but without any additional information like where in the code they happened. > > > I ran the following script > > > opcontrol -h > opcontrol --no-vmlinux > opcontrol --reset > opcontrol --start > opcontrol --setup -e CPU_CLK_UNHALTED:50000,RETIRED_INSTRUCTIONS:50000 > ./bzip2_base.amd64-m64-gcc44-nn > opcontrol --stop > opcontrol --dump > opreport > > In opcontrol mode you'd probably need to use separate -e options, like: opcontrol --setup -e CPU_CLK_UNHALTED:50000 -e RETIRED_INSTRUCTIONS:50000 --no-vmlinux > > > > The output is available at http://pastebin.com/z7Sn09Jr > > Note that it is saying: > > > Invalid event part 50000,RETIRED_INSTRUCTIONS > > > > > > > Regards, > Mahmood > Hope it helps. Michael > > > > > > > > ------------------------------------------------------------------------------