Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 474C9C433FE for ; Tue, 18 Oct 2022 14:33:55 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6AB9940395; Tue, 18 Oct 2022 16:33:54 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id C0EF04021D for ; Tue, 18 Oct 2022 16:33:52 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH] trace: take live traces via telemetry Date: Tue, 18 Oct 2022 16:33:49 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87411@smartserver.smartshare.dk> In-Reply-To: <20221013074928.3062458-1-david.marchand@redhat.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] trace: take live traces via telemetry Thread-Index: Adje2GSG3bnMJRhTT6SQv1V/rGUSSwEJEHSA References: <20221013074928.3062458-1-david.marchand@redhat.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "David Marchand" , Cc: , "Jerin Jacob" , "Sunil Kumar Kori" , "Ciara Power" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: David Marchand [mailto:david.marchand@redhat.com] > Sent: Thursday, 13 October 2022 09.49 >=20 > Register telemetry commands to list and configure trace points and > later > save traces for a running DPDK application. >=20 > Note: trace point names contain a '.', so the list of valid characters > used in telemetry commands and dictionary keys has been extended. Regarding '.' in telemetry commands and dictionary keys, I agree with = Bruce to allow it. >=20 > Example with testpmd running with two net/null ports (startup command > from devtools/test-null.sh): >=20 > --> /trace/list,lib.ethdev.* > {"/trace/list": {"lib.ethdev.configure": "Disabled", > "lib.ethdev.rxq.setup": "Disabled", > "lib.ethdev.txq.setup": "Disabled", > "lib.ethdev.start": "Disabled", > "lib.ethdev.stop": "Disabled", > "lib.ethdev.close": "Disabled", > "lib.ethdev.rx.burst": "Disabled", > "lib.ethdev.tx.burst": "Disabled"}} Jerin commented that "Disabled"/"Enabled" are a bit verbose, and = suggested shortening them. It seems to me that these values are Boolean, and should be true or = false (not surrounded by quotation marks), instead of some string = representing a Boolean value. Note: This would require expanding the = telemetry library with a Boolean type. Alternatively, use integer values 0 or 1. If we want to represent Boolean values as strings, I vote for "TRUE" and = "FALSE", using all upper case to indicate that they are magic strings - = and also to help avoid confusion with the JSON true/false Boolean = values, which are all lower case. >=20 > --> /trace/enable,lib.ethdev.st* > {"/trace/enable": {"Count": 2}} > --> /trace/enable,lib.ethdev.st* > {"/trace/enable": {"Count": 0}} >=20 > --> /trace/list,lib.ethdev.* > {"/trace/list": {"lib.ethdev.configure": "Disabled", > "lib.ethdev.rxq.setup": "Disabled", > "lib.ethdev.txq.setup": "Disabled", > "lib.ethdev.start": "Enabled", > "lib.ethdev.stop": "Enabled", > "lib.ethdev.close": "Disabled", > "lib.ethdev.rx.burst": "Disabled", > "lib.ethdev.tx.burst": "Disabled"}} >=20 > testpmd> stop > ... > testpmd> port stop all > ... > testpmd> port start all > ... > testpmd> start > ... >=20 > --> /trace/save > {"/trace/save": {"Status": "OK", > "Path": ".../dpdk-traces/rte-2022-10-12-AM-10-51-48"}} >=20 > $ babeltrace .../dpdk-traces/rte-2022-10-12-AM-10-51-48 > [10:51:36.229878723] (+?.?????????) lib.ethdev.stop: > { cpu_id =3D 0x0, name =3D "dpdk-testpmd" }, { port_id =3D 0x0, = ret =3D 0 } > [10:51:36.229880251] (+0.000001528) lib.ethdev.stop: > { cpu_id =3D 0x0, name =3D "dpdk-testpmd" }, { port_id =3D 0x1, = ret =3D 0 } > [10:51:40.449359774] (+4.219479523) lib.ethdev.start: > { cpu_id =3D 0x0, name =3D "dpdk-testpmd" }, { port_id =3D 0x0 } > [10:51:40.449377877] (+0.000018103) lib.ethdev.start: > { cpu_id =3D 0x0, name =3D "dpdk-testpmd" }, { port_id =3D 0x1 } >=20 > --> /trace/disable,* > {"/trace/disable": {"Count": 2}} >=20 > Signed-off-by: David Marchand > ---