> From: David Marchand [mailto:david.march...@redhat.com] > Sent: Thursday, 13 October 2022 09.49 > > Register telemetry commands to list and configure trace points and > later > save traces for a running DPDK application. > > 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. > > Example with testpmd running with two net/null ports (startup command > from devtools/test-null.sh): > > --> /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. > > --> /trace/enable,lib.ethdev.st* > {"/trace/enable": {"Count": 2}} > --> /trace/enable,lib.ethdev.st* > {"/trace/enable": {"Count": 0}} > > --> /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"}} > > testpmd> stop > ... > testpmd> port stop all > ... > testpmd> port start all > ... > testpmd> start > ... > > --> /trace/save > {"/trace/save": {"Status": "OK", > "Path": ".../dpdk-traces/rte-2022-10-12-AM-10-51-48"}} > > $ babeltrace .../dpdk-traces/rte-2022-10-12-AM-10-51-48 > [10:51:36.229878723] (+?.?????????) lib.ethdev.stop: > { cpu_id = 0x0, name = "dpdk-testpmd" }, { port_id = 0x0, ret = 0 } > [10:51:36.229880251] (+0.000001528) lib.ethdev.stop: > { cpu_id = 0x0, name = "dpdk-testpmd" }, { port_id = 0x1, ret = 0 } > [10:51:40.449359774] (+4.219479523) lib.ethdev.start: > { cpu_id = 0x0, name = "dpdk-testpmd" }, { port_id = 0x0 } > [10:51:40.449377877] (+0.000018103) lib.ethdev.start: > { cpu_id = 0x0, name = "dpdk-testpmd" }, { port_id = 0x1 } > > --> /trace/disable,* > {"/trace/disable": {"Count": 2}} > > Signed-off-by: David Marchand <david.march...@redhat.com> > ---