Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-13 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-11 Thread Paolo Bonzini
Il 11/05/2013 01:06, Anthony Liguori ha scritto: > The thing is, none of these casts should be for more than 1 level and > the patch I provided makes those casts almost free. Assuming strings are collapsed (and that's why my original attempt to introduce the fast path only looked at the concrete c

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-11 Thread Aurelien Jarno
On Fri, May 10, 2013 at 10:59:22PM +0200, Paolo Bonzini wrote: > Il 10/05/2013 19:41, Anthony Liguori ha scritto: > > Paolo Bonzini writes: > > > >> Il 10/05/2013 16:39, Anthony Liguori ha scritto: > >>> I just oppose the notion of disabling casts and *especially* only > >>> disabling casts for o

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > Il 10/05/2013 19:41, Anthony Liguori ha scritto: >> Paolo Bonzini writes: >> >>> Il 10/05/2013 16:39, Anthony Liguori ha scritto: I just oppose the notion of disabling casts and *especially* only disabling casts for official builds. >>> >>> This actually happen

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 19:41, Anthony Liguori ha scritto: > Paolo Bonzini writes: > >> Il 10/05/2013 16:39, Anthony Liguori ha scritto: >>> I just oppose the notion of disabling casts and *especially* only >>> disabling casts for official builds. >> >> This actually happens all the time. Exactly this kin

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Aurelien Jarno writes: > On Fri, May 10, 2013 at 12:41:07PM -0500, Anthony Liguori wrote: >> Paolo Bonzini writes: >> >> > Il 10/05/2013 16:39, Anthony Liguori ha scritto: >> >> I just oppose the notion of disabling casts and *especially* only >> >> disabling casts for official builds. >> > >>

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Aurelien Jarno
On Fri, May 10, 2013 at 12:41:07PM -0500, Anthony Liguori wrote: > Paolo Bonzini writes: > > > Il 10/05/2013 16:39, Anthony Liguori ha scritto: > >> I just oppose the notion of disabling casts and *especially* only > >> disabling casts for official builds. > > > > This actually happens all the ti

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Aurelien Jarno writes: > On Fri, May 10, 2013 at 02:16:34PM +0200, Paolo Bonzini wrote: >> Cast debugging can have a substantial cost (20% or more, measured by >> Aurelien on qemu-system-ppc64). Instead of adding special-cased "fast >> casts" in the hot paths, we can just disable it in releases.

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > Il 10/05/2013 16:39, Anthony Liguori ha scritto: >> I just oppose the notion of disabling casts and *especially* only >> disabling casts for official builds. > > This actually happens all the time. Exactly this kind of type-safe cast > is disabled in releases of GCC, but

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 18:18, Andreas Färber ha scritto: > Am 10.05.2013 17:56, schrieb Aurelien Jarno: >> To improve the performance a bit more, and come back to the same kind of >> code as before, we should move simple accessors from qom/*.c to >> include/qom/*.h and mark them as inline, so that they can

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Andreas Färber
Am 10.05.2013 17:56, schrieb Aurelien Jarno: > To improve the performance a bit more, and come back to the same kind of > code as before, we should move simple accessors from qom/*.c to > include/qom/*.h and mark them as inline, so that they can be removed by > the compiler. Currently, even if the

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Aurelien Jarno
On Fri, May 10, 2013 at 02:16:34PM +0200, Paolo Bonzini wrote: > Cast debugging can have a substantial cost (20% or more, measured by > Aurelien on qemu-system-ppc64). Instead of adding special-cased "fast > casts" in the hot paths, we can just disable it in releases. At the > same time, add trac

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Andreas Färber
Am 10.05.2013 16:46, schrieb Aurelien Jarno: > We have changed a pointer access in a hot path (and more are likely to > come as far as I know) to a complex function. The correct way to fix > that is to remove the complex function. FWIW I had started to investigate whether I can tweak TCG to use CP

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 16:39, Anthony Liguori ha scritto: > I just oppose the notion of disabling casts and *especially* only > disabling casts for official builds. This actually happens all the time. Exactly this kind of type-safe cast is disabled in releases of GCC, but enabled when building from svn tr

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Aurelien Jarno
On Fri, May 10, 2013 at 09:27:28AM -0500, Anthony Liguori wrote: > Paolo Bonzini writes: > > > Il 10/05/2013 15:01, Anthony Liguori ha scritto: > >> Paolo Bonzini writes: > >> > >>> Cast debugging can have a substantial cost (20% or more, measured by > >>> Aurelien on qemu-system-ppc64). > >>

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > Il 10/05/2013 15:23, Andreas Färber ha scritto: >> Am 10.05.2013 15:08, schrieb Paolo Bonzini: >>> Il 10/05/2013 15:01, Anthony Liguori ha scritto: I'd prefer not to disable but instead focus on improving performance. >>> >>> For 1.5? This is a regression in 1.5 due

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > Il 10/05/2013 15:01, Anthony Liguori ha scritto: >> Paolo Bonzini writes: >> >>> Cast debugging can have a substantial cost (20% or more, measured by >>> Aurelien on qemu-system-ppc64). >> >> [Needs citation] > > Sure: http://permalink.gmane.org/gmane.comp.emulators.qem

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Aurelien Jarno
On Fri, May 10, 2013 at 03:30:17PM +0200, Paolo Bonzini wrote: > Il 10/05/2013 15:23, Andreas Färber ha scritto: > > Am 10.05.2013 15:08, schrieb Paolo Bonzini: > >> Il 10/05/2013 15:01, Anthony Liguori ha scritto: > >>> I'd prefer not to disable but instead focus on improving performance. > >> > >

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 15:23, Andreas Färber ha scritto: > Am 10.05.2013 15:08, schrieb Paolo Bonzini: >> Il 10/05/2013 15:01, Anthony Liguori ha scritto: >>> I'd prefer not to disable but instead focus on improving performance. >> >> For 1.5? This is a regression in 1.5 due to more and more usage of >> fo

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Andreas Färber
Am 10.05.2013 15:08, schrieb Paolo Bonzini: > Il 10/05/2013 15:01, Anthony Liguori ha scritto: >> I'd prefer not to disable but instead focus on improving performance. > > For 1.5? This is a regression in 1.5 due to more and more usage of > foo_env_on_cpu. If CPUs were the only reason, we could

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 15:01, Anthony Liguori ha scritto: > Paolo Bonzini writes: > >> Cast debugging can have a substantial cost (20% or more, measured by >> Aurelien on qemu-system-ppc64). > > [Needs citation] Sure: http://permalink.gmane.org/gmane.comp.emulators.qemu/210830 49,73% perf-10672.map

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > Cast debugging can have a substantial cost (20% or more, measured by > Aurelien on qemu-system-ppc64). [Needs citation] > Instead of adding special-cased "fast > casts" in the hot paths, we can just disable it in releases. At the > same time, add tracing facilities that

[Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Paolo Bonzini
Cast debugging can have a substantial cost (20% or more, measured by Aurelien on qemu-system-ppc64). Instead of adding special-cased "fast casts" in the hot paths, we can just disable it in releases. At the same time, add tracing facilities that simplify the analysys of those problems that cast d