Received: from eggs.gnu.org ([2001:4830:134:3::10]:58492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLsDx-0001Eb-3c for qemu-devel@nongnu.org; Mon, 25 Aug 2014 07:14:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLsDp-0002Oq-Hm for qemu-devel@nongnu.org; Mon, 25 Aug 2014 07:14:09 -0400 Received: from roura.ac.upc.es ([147.83.33.10]:46078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLsDp-0002OJ-75 for qemu-devel@nongnu.org; Mon, 25 Aug 2014 07:14:01 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <20140821175235.12061.22630.stgit@fimbulvetr.bsc.es> <53F763CD.7080202@redhat.com> <8738coo0et.fsf@fimbulvetr.bsc.es> <87bnr9yp5u.fsf@blackfin.pond.sub.org> Date: Mon, 25 Aug 2014 13:13:56 +0200 In-Reply-To: <87bnr9yp5u.fsf@blackfin.pond.sub.org> (Markus Armbruster's message of "Mon, 25 Aug 2014 10:00:29 +0200") Message-ID: <87d2boom8b.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3] trace: [qmp] Add QAPI/QMP commands to query and control event tracing state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Luiz Capitulino , Michael Roth , Stefan Hajnoczi , qemu-devel@nongnu.org Markus Armbruster writes: > Llu=C3=ADs Vilanova writes: >> Eric Blake writes: >>=20 >>> On 08/21/2014 11:52 AM, Llu=C3=ADs Vilanova wrote: [...] >>>> +# >>>> +# Since 2.2 >>>> +## >>>> +{ 'command': 'trace-event-set-state', >>>> + 'data': {'name': 'str', 'state': 'bool', '*keepgoing': 'bool'} } >>=20 >>> This only lets me set the state of one name at a time. Oh, unless I'm >>> setting a pattern, and it then sets the state of all names that match >>> that pattern. I'm wondering if you should have 'name':['str'] to allow >>> me to set multiple names/patterns in one go, instead of having to call >>> the command multiple times; but it's probably not worth the complexity. >>=20 >> I agree with the complexity comment. Also, the keepgoing is useful to se= t events >> using a pattern, even if some of them are statically disabled (otherwise= it >> gives an error). > Yes, let's keep this simple. > However, I feel keepgoing is unnecessarily vague. Its purpose is to > enable use of a pattern in the presence of disabled events. I'd prefer > to nail it down to exactly that purpose rather than having it cover > arbitrary, unspecified errors. > A few ideas on how to do that: > * Have a flag to modify the semantics of the pattern: either "match all > events", or "match just disabled and enabled events, not unavailable > events". > * To find out what a trace-event-set-state actually does, you need to > trace-event-get-state the same pattern. We could make > trace-event-set-state return the events it changed, so you never have > to trace-event-get-state, but it's probably not worthwhile. > [...] I've renamed it to "ignore-unavailable" (off by default). Thanks, Lluis --=20 "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