qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] qom: simplify object_find_property / object_class_find_pr


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2] qom: simplify object_find_property / object_class_find_property
Date: Mon, 14 Sep 2020 17:10:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 9/14/20 3:56 PM, Daniel P. Berrangé wrote:
> When debugging QEMU it is often useful to put a breakpoint on the
> error_setg_internal method impl.
> 
> Unfortunately the object_property_add / object_class_property_add
> methods call object_property_find / object_class_property_find methods
> to check if a property exists already before adding the new property.
> 
> As a result there are a huge number of calls to error_setg_internal
> on startup of most QEMU commands, making it very painful to set a
> breakpoint on this method.
> 
> Most callers of object_find_property and object_class_find_property,
> however, pass in a NULL for the Error parameter. This simplifies the
> methods to remove the Error parameter entirely, and then adds some
> new wrapper methods that are able to raise an Error when needed.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> 
> v1: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg03621.html
> 
>  hw/arm/armv7m.c                  | 10 +++---
>  hw/arm/exynos4210.c              |  2 +-
>  hw/arm/highbank.c                |  2 +-
>  hw/arm/integratorcp.c            |  2 +-
>  hw/arm/realview.c                |  2 +-
>  hw/arm/sbsa-ref.c                |  2 +-
>  hw/arm/versatilepb.c             |  2 +-
>  hw/arm/vexpress.c                |  4 +--
>  hw/arm/virt.c                    | 10 +++---
>  hw/arm/xilinx_zynq.c             |  2 +-
>  hw/core/qdev-properties-system.c |  2 +-
>  hw/core/sysbus.c                 |  2 +-
>  hw/cpu/a15mpcore.c               |  4 +--
>  hw/cpu/a9mpcore.c                |  2 +-
>  hw/misc/iotkit-sysctl.c          |  2 +-
>  hw/pci/pci.c                     |  2 +-
>  hw/scsi/scsi-bus.c               |  4 +--
>  include/qom/object.h             | 48 ++++++++++++++++++++++---
>  qom/object.c                     | 60 +++++++++++++++++++-------------
>  target/arm/monitor.c             |  2 +-
>  target/i386/cpu.c                |  2 +-
>  target/ppc/translate_init.c.inc  |  2 +-
>  22 files changed, 109 insertions(+), 61 deletions(-)

If possible, please use scripts/git.orderfile ;)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>




reply via email to

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