All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fedorov Sergey <s.fedorov@samsung.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	"Michael Roth" <mdroth@linux.vnet.ibm.com>,
	"Paul Brook" <paul@codesourcery.com>,
	"Anthony Liguori" <aliguori@amazon.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	a.basov@samsung.com, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] qom: fix cast results caching
Date: Tue, 17 Dec 2013 13:55:20 +0400	[thread overview]
Message-ID: <52B01F88.5000908@samsung.com> (raw)
In-Reply-To: <CAEgOgz5zszwaAjax9yOE5UGRX-swFRwmEjebHd7ciaDVNCToyA@mail.gmail.com>


On 12/17/2013 01:40 PM, Peter Crosthwaite wrote:
> On Tue, Dec 17, 2013 at 7:20 PM, Sergey Fedorov <s.fedorov@samsung.com> wrote:
>> A single cast cache is used for both an object casting and a class
>> casting.  In case of interface presence a class cast result may be not
>> the same pointer as opposite to an object casting. So do not cache cast
>> results for an object casting in a presence of interfaces.
>>
> I think this is fixed by my cast cache splitter patch which is
> currently enqueued.
>
> http://patchwork.ozlabs.org/patch/294766/
>
> Regards,
> Peter

Yes, your cache splitter looks much better. Thank you.

Best regards,
Sergey Fedorov


>
>
>> Signed-off-by: Sergey Fedorov <s.fedorov@samsung.com>
>> ---
>>   qom/object.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/qom/object.c b/qom/object.c
>> index fc19cf6..f7384de 100644
>> --- a/qom/object.c
>> +++ b/qom/object.c
>> @@ -473,7 +473,7 @@ Object *object_dynamic_cast_assert(Object *obj, const char *typename,
>>
>>       assert(obj == inst);
>>
>> -    if (obj && obj == inst) {
>> +    if (obj && obj == inst && !obj->class->interfaces) {
>>           for (i = 1; i < OBJECT_CLASS_CAST_CACHE; i++) {
>>               obj->class->cast_cache[i - 1] = obj->class->cast_cache[i];
>>           }
>> --
>> 1.7.9.5
>>
>>

  reply	other threads:[~2013-12-17  9:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17  9:20 [Qemu-devel] [PATCH] qom: fix cast results caching Sergey Fedorov
2013-12-17  9:40 ` Peter Crosthwaite
2013-12-17  9:55   ` Fedorov Sergey [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-12-17  9:17 Sergey Fedorov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52B01F88.5000908@samsung.com \
    --to=s.fedorov@samsung.com \
    --cc=a.basov@samsung.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=paul@codesourcery.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.