qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH qemu] RFC: memory/hmp: Print owners/parents in "


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH qemu] RFC: memory/hmp: Print owners/parents in "info mtree"
Date: Mon, 16 Apr 2018 15:30:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 16/04/2018 15:20, Igor Mammedov wrote:
> Generally object doesn't need to know its own name,
> we use it only for debugging and nice error reporting so far.
> I'd rather have 'id' property at Object level so we won't have
> to fish out ID from parent /which we aren't supposed to do and
> which doesn't work in some cases/ when it's needed within
> object itself.

Having an 'id' at object level is also a mess, because that id is
invalid after unparent.  Since this is just for debugging use,
object_get_canonical_path_component is the right function.  We can just
make it return NULL if there is no parent.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]