On Wed, Mar 30, 2011 at 03:41:09PM +0200, Avi Kivity wrote:
> On 03/30/2011 03:36 PM, Gleb Natapov wrote:
> >>
> >> It's wierd. Do you get perf hits in the copying?
> >>
> >How can I check. The memcpy is inlined.
> >
>
> perf annotate x86_emulate_instruction
>
> (newer perf allows you to get there interactively from 'perf report')
>
> >> Copying a couple of hot cache lines shouldn't take any measurable
Ah, forgot about it:
First one:
27.71 : 1179f: f3 a5 rep movsl
%ds:(%rsi),%es:(%rdi)
Second one:
32.68 : 11888: f3 a5 rep movsl
%ds:(%rsi),%es:(%rdi)
> >> time compared to a heavyweight exit.
> >>
> >The whole function takes only 1.5% CPU. Perf measures how much this
> >function become faster and heavyweight exit is not part of the function.
>
> It's still relative to exit cost. If the total exit was 2 us, then
> a 1% decrease in cost translates to 40 ns.
>
> (well, that's not unlikely for a 256 byte memcpy, but let's be sure).
>
> --
> error compiling committee.c: too many arguments to function
--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html