From: Markus Armbruster <armbru@redhat.com>
To: Steve Sistare <steven.sistare@oracle.com>
Cc: qemu-devel@nongnu.org, John Snow <jsnow@redhat.com>,
Cleber Rosa <crosa@redhat.com>, Eric Blake <eblake@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"Daniel P. Berrange" <berrange@redhat.com>,
Eduardo Habkost <eduardo@habkost.net>,
Fabiano Rosas <farosas@suse.de>,
Laurent Vivier <lvivier@redhat.com>,
Philippe Mathieu-Daude <philmd@linaro.org>
Subject: Re: [PATCH V4 2/3] python: use qom-list-get
Date: Fri, 11 Jul 2025 16:47:40 +0200 [thread overview]
Message-ID: <871pqmwzqr.fsf@pond.sub.org> (raw)
In-Reply-To: <1752164694-215567-3-git-send-email-steven.sistare@oracle.com> (Steve Sistare's message of "Thu, 10 Jul 2025 09:24:53 -0700")
Steve Sistare <steven.sistare@oracle.com> writes:
> Use qom-list-get to speed up the qom-tree command.
>
> Signed-off-by: Steve Sistare <steven.sistare@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 <armbru@redhat.com>
$ 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
next prev parent reply other threads:[~2025-07-11 15:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 16:24 [PATCH V4 0/3] fast qom tree get Steve Sistare
2025-07-10 16:24 ` [PATCH V4 1/3] qom: qom-list-get Steve Sistare
2025-07-11 14:35 ` Markus Armbruster
2025-07-11 15:22 ` Steven Sistare
2025-07-10 16:24 ` [PATCH V4 2/3] python: use qom-list-get Steve Sistare
2025-07-11 14:47 ` Markus Armbruster [this message]
2025-07-11 15:23 ` Steven Sistare
2025-07-11 16:50 ` Markus Armbruster
2025-07-11 17:08 ` Steven Sistare
2025-07-15 17:27 ` John Snow
2025-07-16 8:32 ` Markus Armbruster
2025-08-07 22:04 ` John Snow
2025-08-08 6:28 ` Markus Armbruster
2025-08-08 16:16 ` John Snow
2025-07-10 16:24 ` [PATCH V4 3/3] tests/qtest/qom-test: unit test for qom-list-getv Steve Sistare
2025-07-11 15:02 ` Markus Armbruster
2025-07-11 15:23 ` Steven Sistare
2025-07-11 15:06 ` [PATCH V4 0/3] fast qom tree get Markus Armbruster
2025-07-11 15:27 ` Steven Sistare
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=871pqmwzqr.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=crosa@redhat.com \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=farosas@suse.de \
--cc=jsnow@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=steven.sistare@oracle.com \
/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.