JK -- Yes, they are not compatible but still they shouldn't contradict each other.

I realized I am missing the "-u" flag later on. I mistakenly thought "-k" means kernel + user mode. What still puzzles me is that although I was sampling in kernel mode only, I still got samples in the user-code. That's what made me make my wrong assumption. Any idea why ?

           6   0.39%  86.79% 0xffffffff802be670 generic_permission<kernel>
           6   0.39%  87.18% 0xffffffff802965d0 __inc_zone_state<kernel>
     >>>   6   0.39%  87.57% 0x000000000048fee0 PyEval_EvalFrameEx</usr/local/bin/python>

On Mon, Apr 20, 2009 at 12:54 AM, stephane eranian <eranian@googlemail.com> wrote:

On Sun, Apr 19, 2009 at 9:05 AM, Nagy Mostafa <nagy.mostafa@gmail.com> wrote:
> Hi,
> I have a question about something strange I have noticed while collecting
> profiles using pfmon. When I run a single cold run of the 2to3 benchmark,
> the "time" command (or using --show-time) gives me:
> $time /usr/local/bin/python -E -O benchmarks/unladen-swallow/lib/2to3/2to3
> -f all benchmarks/unladen-swallow/lib/2to3 > /dev/null
> real 0m19.523s      user 0m19.485s         sys 0m0.044s

If you want comparable results, you simply need to count and breakdown
kernel vs. user. Here how you can do this (assuming Core 2):

pfmon -eunhalted_core_cycles,cpu_clk_unhalted:core_p,cpu_clk_unhalted_core_p
--priv-levels=uk,u,k 2to3

You will get 3 counts out. The first counts user+kernel cycles, the
2nd only user, 3rd only kernel.