Tracing HMP commands
Hi! I've been writing some QAPI/QMP commands to control tracing state, and I was wondering if the HMP commands (trace-event, trace-file and trace-events) can be dropped, or whether I should adapt them to the new ones.
Thanks,
Lluis
Signature · 4 lines
"And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth
Quoted 3 lines · Lluís Vilanova
Hi! I've been writing some QAPI/QMP commands to control tracing state, and I was wondering if the HMP commands (trace-event, trace-file and trace-events) can be dropped, or whether I should adapt them to the new ones.
We've already documented that HMP is an unstable interface; if it is easier for you to drop commands than to retrofit them to cover new QMP, it won't hurt my feelings (libvirt only uses QMP). It boils down to a judgment call of whether the ease of convenience for a developer's human interface outweighs the burden of maintenance.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Quoted 3 lines · On Mon, 18 Aug 2014 17:10:36 +0200 Lluís Vilanova <[email protected]> wrote:
Hi! I've been writing some QAPI/QMP commands to control tracing state, and I was wondering if the HMP commands (trace-event, trace-file and trace-events) can be dropped, or whether I should adapt them to the new ones.
As far as compatibility is concerned, there's no problem dropping them as they don't exist in QMP. So, this is more a question of deciding what's the best API for tracing.
Quoted 10 lines · Eric Blake
Quoted 3 lines · Lluís Vilanova
Hi! I've been writing some QAPI/QMP commands to control tracing state, and I was wondering if the HMP commands (trace-event, trace-file and trace-events) can be dropped, or whether I should adapt them to the new ones.
We've already documented that HMP is an unstable interface; if it is easier for you to drop commands than to retrofit them to cover new QMP, it won't hurt my feelings (libvirt only uses QMP). It boils down to a judgment call of whether the ease of convenience for a developer's human interface outweighs the burden of maintenance.
So far I've added the QAPI commands:
trace-event-get-state <pattern> # returns a list of event state descriptors trace-event-set-state <pattern> <state> # has no return value
They are used in the corresponding HMP commands "info trace-events" and "trace-event", respectively. Still, I have not figured out how to propagate QMP errors to HMP, and I was wondering if I can just drop them even if they are simple to port (qmp-shell is quite convenient).
What I have not ported is "trace-file", which only works for the simple backend, and would probably require multiple QAPI commands. I'm in favour of just dropping this one, together with the backend code that exists only to handle this command (the st_* functions in "trace/simple.h" can then be static or dropped).
Thanks,
Lluis
Signature · 4 lines
"And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth