qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 7a309c: qom: Change object_get_canonical_path


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 7a309c: qom: Change object_get_canonical_path_component() ...
Date: Tue, 21 Jul 2020 11:30:37 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7a309cc95b862be74711e7a35997daa3f885651a
      
https://github.com/qemu/qemu/commit/7a309cc95b862be74711e7a35997daa3f885651a
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2020-07-21 (Tue, 21 Jul 2020)

  Changed paths:
    M backends/hostmem.c
    M block/throttle-groups.c
    M gdbstub.c
    M hw/arm/xlnx-zynqmp.c
    M hw/block/nvme.c
    M hw/core/machine-qmp-cmds.c
    M hw/core/machine.c
    M hw/mem/nvdimm.c
    M hw/mem/pc-dimm.c
    M hw/misc/ivshmem.c
    M hw/ppc/spapr_drc.c
    M hw/ppc/trace-events
    M hw/virtio/virtio-crypto.c
    M hw/virtio/virtio-mem.c
    M hw/virtio/virtio-pmem.c
    M include/qom/object.h
    M iothread.c
    M net/net.c
    M qom/object.c
    M qom/qom-hmp-cmds.c
    M scsi/pr-manager-helper.c
    M scsi/pr-manager.c
    M softmmu/memory.c

  Log Message:
  -----------
  qom: Change object_get_canonical_path_component() not to malloc

object_get_canonical_path_component() returns a malloced copy of a
property name on success, null on failure.

19 of its 25 callers immediately free the returned copy.

Change object_get_canonical_path_component() to return the property
name directly.  Since modifying the name would be wrong, adjust the
return type to const char *.

Drop the free from the 19 callers become simpler, add the g_strdup()
to the other six.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200714160202.3121879-4-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>


  Commit: 5bd929d2fff068f829688f27b54f2f159ff06eb6
      
https://github.com/qemu/qemu/commit/5bd929d2fff068f829688f27b54f2f159ff06eb6
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2020-07-21 (Tue, 21 Jul 2020)

  Changed paths:
    M include/qom/object.h

  Log Message:
  -----------
  qom: Document object_get_canonical_path() returns malloced string

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200714160202.3121879-5-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


  Commit: 0dde9fd12fd39762ff68fca80d2f0a735d66e7bd
      
https://github.com/qemu/qemu/commit/0dde9fd12fd39762ff68fca80d2f0a735d66e7bd
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2020-07-21 (Tue, 21 Jul 2020)

  Changed paths:
    M qom/qom-hmp-cmds.c

  Log Message:
  -----------
  qom: Make info qom-tree sort children more efficiently

Commit e8c9e65816 "qom: Make "info qom-tree" show children sorted"
sorts children the simple, stupid, quadratic way.  I thought the
number of children would be small enough for this not to matter.  I
was wrong: there are outliers with several hundred children, e.g ARM
machines nuri and smdkc210 each have a node with 513 children.

While n^2 sorting isn't noticeable in normal, human usage even for
n=513, it can be quite noticeable in certain automated tests.  In
particular, the sort made device-introspect-test even slower.  Commit
3e7b80f84d "tests: improve performance of device-introspect-test" just
fixed that by cutting back its excessive use of "info qom-tree".
Sorting more efficiently makes sense regardless, so do it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200714160202.3121879-6-armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: b50dab9ecac442acc1b316e4749dae36a2fe7d61
      
https://github.com/qemu/qemu/commit/b50dab9ecac442acc1b316e4749dae36a2fe7d61
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-07-21 (Tue, 21 Jul 2020)

  Changed paths:
    M backends/hostmem.c
    M block/throttle-groups.c
    M gdbstub.c
    M hw/arm/xlnx-zynqmp.c
    M hw/block/nvme.c
    M hw/core/machine-qmp-cmds.c
    M hw/core/machine.c
    M hw/mem/nvdimm.c
    M hw/mem/pc-dimm.c
    M hw/misc/ivshmem.c
    M hw/ppc/spapr_drc.c
    M hw/ppc/trace-events
    M hw/virtio/virtio-crypto.c
    M hw/virtio/virtio-mem.c
    M hw/virtio/virtio-pmem.c
    M include/qom/object.h
    M iothread.c
    M net/net.c
    M qom/object.c
    M qom/qom-hmp-cmds.c
    M scsi/pr-manager-helper.c
    M scsi/pr-manager.c
    M softmmu/memory.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-qom-2020-07-21' into 
staging

QOM patches for 2020-07-21

# gpg: Signature made Tue 21 Jul 2020 16:40:27 BST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qom-2020-07-21:
  qom: Make info qom-tree sort children more efficiently
  qom: Document object_get_canonical_path() returns malloced string
  qom: Change object_get_canonical_path_component() not to malloc

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/a418695e1b17...b50dab9ecac4



reply via email to

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