From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEy8p-0002Fv-FX for qemu-devel@nongnu.org; Mon, 20 Jun 2016 08:17:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEy8k-0008Lm-AD for qemu-devel@nongnu.org; Mon, 20 Jun 2016 08:17:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEy8k-0008Lh-38 for qemu-devel@nongnu.org; Mon, 20 Jun 2016 08:17:18 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF976C049E17 for ; Mon, 20 Jun 2016 12:17:17 +0000 (UTC) From: Markus Armbruster References: <146590985033.16561.16324808287190305042.stgit@fimbulvetr.bsc.es> <146590988276.16561.7454935023049676591.stgit@fimbulvetr.bsc.es> <87y460coi6.fsf@dusky.pond.sub.org> <87oa6wt9m0.fsf@fimbulvetr.bsc.es> Date: Mon, 20 Jun 2016 14:17:15 +0200 In-Reply-To: <87oa6wt9m0.fsf@fimbulvetr.bsc.es> (=?utf-8?Q?=22Llu=C3=ADs?= Vilanova"'s message of "Mon, 20 Jun 2016 12:53:11 +0200") Message-ID: <874m8o6oms.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Luiz Capitulino , qemu-devel@nongnu.org, Stefan Hajnoczi , Eduardo Habkost Llu=C3=ADs Vilanova writes: > Markus Armbruster writes: > >> Llu=C3=ADs Vilanova writes: >>> Signed-off-by: Llu=C3=ADs Vilanova >>> Reviewed-by: Stefan Hajnoczi >>> --- >>> monitor.c | 4 +- >>> qapi/trace.json | 20 ++++++-- >>> qmp-commands.hx | 17 ++++++- >>> trace/qmp.c | 143 ++++++++++++++++++++++++++++++++++++++++++++----= ------- >>> 4 files changed, 147 insertions(+), 37 deletions(-) >>>=20 >>> diff --git a/monitor.c b/monitor.c >>> index a27e115..bb89877 100644 >>> --- a/monitor.c >>> +++ b/monitor.c >>> @@ -910,7 +910,7 @@ static void hmp_trace_event(Monitor *mon, const QDi= ct *qdict) >>> bool new_state =3D qdict_get_bool(qdict, "option"); >>> Error *local_err =3D NULL; >>>=20 >>> - qmp_trace_event_set_state(tp_name, new_state, true, true, &local_e= rr); >>> + qmp_trace_event_set_state(tp_name, new_state, true, true, false, 0= , &local_err); >>> if (local_err) { >>> error_report_err(local_err); >>> } >>> @@ -1069,7 +1069,7 @@ static void hmp_info_cpustats(Monitor *mon, const= QDict *qdict) >>>=20 >>> static void hmp_info_trace_events(Monitor *mon, const QDict *qdict) >>> { >>> - TraceEventInfoList *events =3D qmp_trace_event_get_state("*", NULL= ); >>> + TraceEventInfoList *events =3D qmp_trace_event_get_state("*", fals= e, 0, NULL); >>> TraceEventInfoList *elem; >>>=20 >>> for (elem =3D events; elem !=3D NULL; elem =3D elem->next) { > >> The new feature remains inaccessible in HMP. Any plans to extend HMP? >> Any reasons not to? > > BTW, I was just looking at "info trace-events" and it only shows the stat= e for > all events (there's no name pattern argument). Is it worth updating HMP k= nowing > it should be replaced in favour of the newer QAPI interface? QMP is not meant as replacement for HMP. QMP is a stable interface for machines, HMP is a convenient interface for humans. New functionality is usually added to both. HMP sometimes gets additional convenience features. In rare cases, a feature is deemed of no interest to humans, and left out of HMP. Is filtering by vCPU such a case?