On 7/11/2025 10:47 AM, Markus Armbruster wrote:
Steve Sistare <steven.sist...@oracle.com> writes:

Use qom-list-get to speed up the qom-tree command.

Signed-off-by: Steve Sistare <steven.sist...@oracle.com>

Quick test...  Differences in output before and after match expectations
(see appended diff).

New version:

     real    0m0.446s
     user    0m0.062s
     sys     0m0.017s

Old version barfs a stack backtrace (appended), and is ~18x slower:

     real    0m8.176s
     user    0m0.395s
     sys     0m0.126s

Did you see the stack backtrace, too?

Regardless
Acked-by: Markus Armbruster <arm...@redhat.com>

Thanks.  Do you want a tested-by credit, or is that too little testing
for you to stand behind that endorsement?

I observe the same expected differences.

My test did not backtrace.  Must be a different VM.

- Steve

$ diff old new
59c59
<   rtc-time: {'tm_year': 125, 'tm_sec': 24, 'tm_hour': 14, 'tm_min': 39, 
'tm_mon': 6, 'tm_mday': 11} (struct tm)
---
   rtc-time: {'tm_year': 125, 'tm_sec': 28, 'tm_hour': 14, 'tm_min': 40, 
'tm_mon': 6, 'tm_mday': 11} (struct tm)
486c486
<   date: {'tm_year': 125, 'tm_sec': 25, 'tm_hour': 14, 'tm_min': 39, 'tm_mon': 
6, 'tm_mday': 11} (struct tm)
---
   date: {'tm_year': 125, 'tm_sec': 28, 'tm_hour': 14, 'tm_min': 40, 'tm_mon': 
6, 'tm_mday': 11} (struct tm)
832c832
<   legacy-memory: <EXCEPTION: Property 'qemu64-x86_64-cpu.legacy-memory' is not 
readable> (str)
---
   legacy-memory: <EXCEPTION: property could not be read> (str)
1109c1109
<   crash-information: <EXCEPTION: No crash occurred> (GuestPanicInformation)
---
   crash-information: <EXCEPTION: property could not be read> 
(GuestPanicInformation)
1554c1554
<   legacy-i8042: <EXCEPTION: Property 'vmmouse.legacy-i8042' is not readable> 
(str)
---
   legacy-i8042: <EXCEPTION: property could not be read> (str)
2436c2436
<   legacy-iothread: <EXCEPTION: Property 'virtio-blk-device.legacy-iothread' is 
not readable> (str)
---
   legacy-iothread: <EXCEPTION: property could not be read> (str)
2493c2493
<   legacy-iothread: <EXCEPTION: Property 'virtio-blk-device.legacy-iothread' is 
not readable> (str)
---
   legacy-iothread: <EXCEPTION: property could not be read> (str)


Exception ignored in: <function QEMUMonitorProtocol.__del__ at 0x7fcfcd080d60>
Traceback (most recent call last):
   File "/work/armbru/qemu/scripts/qmp/../../python/qemu/qmp/legacy.py", line 
310, in __del__
     self.close()
   File "/work/armbru/qemu/scripts/qmp/../../python/qemu/qmp/legacy.py", line 
281, in close
     self._sync(
   File "/work/armbru/qemu/scripts/qmp/../../python/qemu/qmp/legacy.py", line 
102, in _sync
     return self._aloop.run_until_complete(
   File "/usr/lib64/python3.13/asyncio/base_events.py", line 719, in 
run_until_complete
     return future.result()
   File "/usr/lib64/python3.13/asyncio/tasks.py", line 507, in wait_for
     return await fut
   File "/work/armbru/qemu/scripts/qmp/../../python/qemu/qmp/protocol.py", line 
399, in disconnect
     await self._wait_disconnect()
   File "/work/armbru/qemu/scripts/qmp/../../python/qemu/qmp/protocol.py", line 
719, in _wait_disconnect
     await all_defined_tasks  # Raise Exceptions from the bottom half.
   File "/work/armbru/qemu/scripts/qmp/../../python/qemu/qmp/protocol.py", line 
870, in _bh_loop_forever
     await async_fn()
RuntimeError: cannot reuse already awaited coroutine



Reply via email to