Thanks a lot. 

On Mon, Aug 1, 2011 at 3:22 PM, Robert Richter <> wrote:
On 31.07.11 23:58:07, ustc.mail wrote:
> I encounter some issues on the westmere with Oprofile.

Please send questions like this to the mailing list and keep the list
cc'ed with your replies.

> Configuration: 
> 1. Westmere L5640 six cores, oprofile-0.9.7-rc4; 
> 2. Sample events: CPU_CLK_UNHALTED
> 3. Running while loop program on core 0, to consume CPU cycle, such as while
> (1);
> Command used:
>  1090  sudo opcontrol  --setup --vmlinux=/home/backyes/git.linux-2.6.tovard/
> vmlinux --separate=library,kernel --event=default --session-dir=.
>  1091  sudo opcontrol --reset
>  1092  sudo opcontrol --start
>  1093  sudo opcontrol --shutdown
> This can dump correct hot-spot on the while loop program.
> ------------ try again, ------------
>  1099  sudo opcontrol  --setup --vmlinux=/home/backyes/git.linux-2.6.tovard/
> vmlinux --separate=library,kernel --event=default --session-dir=.
>  1100  sudo opcontrol --reset
>  1101  sudo opcontrol --start
>  1102  sudo opcontrol --shutdown
> However, oprofile can not works. Result as follow:
> samples  %        image name               app name                 symbol name
> 5860     40.6803  vmlinux                  vmlinux                
>  mwait_idle_with_hints

Is this the output of your first run, or the second?

Not the first one, I have run  oprofile for several time. 

> It can not find the hot-spot rather than the idle process.
> retry it again and again, the result will be similar. 

Have you tried to clear the session dir by removing all files in it?
Sometimes you also have to remove .oprofile/daemonrc in your home.

I have removed all files in the session dir. The result is similar. I have not found the .oprofile/daemonrc in my home.  The same steps taken on the other counter, such as L2_WRITE, L2_DATA_RQSTS, is the same, and the result seems ok.
> Do the same process on E5620 process with 2 socket(totally 8 core), it has
> similar result.

Your problem does not seem to be cpu related. But please provide the
output of 'dmesg | grep oprofile'.
[backyes@host-a-120 westmere8C]$ dmesg | grep oprofile
oprofile: using NMI interrupt.
SELinux: initialized (dev oprofilefs, type oprofilefs), uses genfs_contexts
[backyes@host-a-120 westmere8C]$  



Advanced Micro Devices, Inc.
Operating System Research Center