perfetto_cmd: overhaul --query
This solves two problems:
1. The output of --query has become too verbose over time
and human unfriendly. --query has always been meant as
an aid to humans to tell what's going on in the service.
2. Add an option to list the names of the ongoing tracing
sessions. We tend to need it frequently in droidfood.
Example output:
```
Not meant for machine consumption. Use --query-raw for scripts.
Service: Perfetto v23.0-4bf9e6896 (4bf9e6896e9fc4902756927ec9ff225e04a755c7)
Tracing sessions: 1 (started: 1)
PRODUCER PROCESSES CONNECTED:
ID PID UID NAME SDK
== === === ==== ===
1 3471 0 perfetto.traced_probes Perfetto v23.0-4bf9e6896
DATA SOURCES REGISTERED:
NAME PRODUCER DETAILS
=== ======== ========
android.log perfetto.traced_probes (1)
android.packages_list perfetto.traced_probes (1)
android.polled_state perfetto.traced_probes (1)
android.power perfetto.traced_probes (1)
linux.ftrace perfetto.traced_probes (1)
linux.inode_file_map perfetto.traced_probes (1)
linux.process_stats perfetto.traced_probes (1)
linux.sys_stats perfetto.traced_probes (1)
linux.sysfs_power perfetto.traced_probes (1)
linux.system_info perfetto.traced_probes (1)
perfetto.metatrace perfetto.traced_probes (1)
TRACING SESSIONS:
ID UID STATE NAME BUF (#) KB DUR (s) #DS STARTED
=== === ===== ==== ========== ======= === =======
8 0 STARTED aot_test (1) 65536 10 4 01:08:08
```
Change-Id: I16785bcb701a3e6d006cd9aae5262ca8ed1442f6
diff --git a/CHANGELOG b/CHANGELOG
index 8dbe728..9b62dc9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
Unreleased:
Tracing service and probes:
- *
+ * Changed output format of perfetto --query. Made the output more compact
+ and added a summary of ongoing tracing sessions for the caller UID.
Trace Processor:
*
UI: