1Unreleased: 2 Tracing service and probes: 3 * Compression has been moved from perfetto_cmd to traced. Now compression is 4 supported even with write_into_file. The `compress_from_cli` config option 5 can be used to restore the old behavior. 6 Trace Processor: 7 * 8 UI: 9 * 10 SDK: 11 * 12 13v34.0 - 2023-05-02: 14 Tracing service and probes: 15 * --continuous-dump in tools/java_heap_dump now keeps recording until it 16 receives CTRL+C. 17 * Add CLONE_SNAPSHOT triggers for non-destructive snapshots of the trace 18 buffer without tracing interruption. 19 Trace Processor: 20 * 21 UI: 22 * Add support for parsing large integers from Trace Processor into 23 bigint. This is the default behaviour for unknown fields and can 24 be enabled specifically via the LONG and LONG_NULL column types. 25 SDK: 26 * Changed the type of the static constexpr metadata on protozero 27 generated bindings from a function returning the metadata to 28 metadata itself. For a field 'foo' the variable kFoo previously 29 defined as: 30 `static constexpr FieldMetadata_Foo kFoo() = { return {}; };` 31 it is now defined as: 32 `static constexpr FieldMetadata_Foo kFoo;` 33 This is a breaking change for users who directly access field 34 metadata. 35 * The new DataSourceBase::OnFlush() method allows users to properly handle 36 Flush requests. 37 38v33.1 - 2023-03-03: 39 Identical to v33.0. Version was bumped to work around prebuilt infra failures. 40 41v33.0 - 2023-03-02: 42 All: 43 * Switched to a C++17-only project by removing C++11 opt-out. This completes 44 the migration started in v31.0. 45 SDK: 46 * Tracing::Initialize() can be called more than once to initialize different 47 backends separately. 48 * Reduce binary size impact of autogenerated code. 49 50v32.2 - 2023-02-16: 51 SDK: 52 * Fix MSVC warnings. 53 54 55v32.1 - 2023-02-01: 56 Trace Processor: 57 * Fix build on windows. 58 59 60v32.0 - 2023-02-01: 61 Tracing service and probes: 62 * Added an explicit TraceUuid packet. The tracing service now always 63 generates a UUID, even if TraceConfig.trace_uuid_msb/lsb is empty. 64 Trace Processor: 65 * 66 UI: 67 * 68 SDK: 69 * Add perfetto::Tracing::ActivateTriggers() function. 70 * Made it possible to declare track event categories in a C++ namespace 71 with PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE, allowing multiple category 72 sets to be used in one same translation unit. Correspondingly, the 73 PERFETTO_COMPONENT_EXPORT and PERFETTO_TRACK_EVENT_NAMESPACE macros have 74 been deprecated in favor of this new functionality. 75 * Deprecated the PERFETTO_COMPONENT_EXPORT macro in favor of 76 PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS. 77 * Added TracingInitArgs::enable_system_consumer configuration option, that 78 allows the linker to discard the consumer IPC, if not required. 79 80 81v31.0 - 2022-11-10: 82 Tracing service and probes: 83 * Added support for collecting Android Trusty ftrace events. 84 * Fixed resetting syscall filter when recording selected syscalls. 85 Trace Processor: 86 * Improved error messages on SQL syntax errors. 87 * Improved performance of queries containing GLOB. Handling of GLOB 88 constraints now happens inside trace processor instead of SQLite. 89 * Added support for parsing Android Trusty ftrace events. 90 UI: 91 * Added support for metatracing UI code and integrate with trace processor 92 metatracing. 93 * Added support for scrolling to a time region using the postMessage API. 94 * Enabled Pivot table functionality by default. 95 * Fixed downloading of Java heap profiles. 96 SDK: 97 * Switched to require C++17 by default. A time-limited opt-out exists but 98 is planned to be removed in v34. Please contact us at 99 perfetto-dev@googlegroups.com if you have thoughts or concerns on this 100 move. 101 102 103v30.0 - 2022-10-06: 104 Trace Processor: 105 * Fixed parsing of "R+" (preempted) and "I" (idle kernel thread) end states 106 of sched_switch events, collected on Linux kernels v4.14 and above. 107 Previously, preemption was not recognised, and idle was reported as 108 "x" (task dead). See commit c60a630cfe0. 109 * Add support for parsing sys_write syscalls. 110 * Remove the thread_slice table: all columns have moved to the slice table 111 and thread_slice exists as a view for backwards compatibility. This view 112 will also be removed in the future 113 * Add Base64 encode SQL function. 114 * Add support for importing function graph ftrace events. 115 * Add support for importing V4L2 ftrace events. 116 * Add support for importing virtio-video ftrace events. 117 UI: 118 * Fix downloading profiles from flamegraphs. 119 * Enable Pivot table support by default. 120 SDK: 121 * Add support for disallowing concurrent tracing sessions. 122 123 124v29.0 - 2022-09-06: 125 Tracing service and probes: 126 * Add support for only tracing selected syscalls. By selecting only syscalls 127 of interest, usage of the trace buffer and performance impact on device 128 is reduced. 129 * Add support for parsing DSI ftrace events. 130 Trace Processor: 131 * Make calling NotifyEndOfFile more than once an error: this was deprecated 132 in v28. Flush should be used instead for all by the final call. 133 * Add parsing and ingestion for V4L2 events. 134 * Upgraded SQLite to 3.39.2. 135 UI: 136 * Add support for searching Android log events. 137 * Group kernel wakelock tracks into a single track group. 138 SDK: 139 * Added support for startup tracing. Tracing can be started in an app 140 before it connects to the tracing service. 141 The data sources which are started for startup tracing, will 142 be automatically adopted to normal tracing session once we start 143 normal tracing session. 144 * Added the |first_packet_on_sequence| boolean which is set the first packet 145 emitted on each TraceWriter. 146 147 148v28.0 - 2022-08-02: 149 Tracing service and probes: 150 * Add android.statsd datasource. 151 * Removed log spam about sys.trace.traced_started in standalone builds. 152 * Changed kallsyms parsing in traced_probes (ftrace) to be always 153 synchronous (when starting the trace, rather than on the first batch). 154 * Added ksyms_mem_policy = KSYMS_RETAIN_FOREVER config to avoid destroying 155 and re-parsing kallsysm repeatedly in benchmark runs. 156 * Improve heap profiling shutdown: now the shared memory buffer where 157 alloc/free records are stored is properly flushed when stopping the data 158 source. 159 * Fixed race condition in the daemonization path of perfetto --background. 160 It would cause daemonization failures if the TTY is destroyed immediately. 161 Trace Processor: 162 * Deprecate calling NotifyEndOfFile more than once: Flush should instead be 163 used for all but the final call. 164 * Added ingestion and visualization of I2C transactions. 165 UI: 166 * Changed callstack sampling selection: selecting one sample now only shows 167 one stacktrace, selecting multiple samples shows the aggregation. 168 SDK: 169 * Fixed a bug (b/239725760) that would cause abstract sockets using the 170 "@name" syntax in PERFETTO_CONSUMER_SOCK_NAME/PERFETTO_PRODUCER_SOCK_NAME 171 to have a trailing \0 in the socket name. This breaks interoperability 172 with adb forwarding. This is a tracing protocol breaking change. Nobody 173 seems to be relying on @abstract syntax across different versions of 174 client vs service. 175 * Changed the mangling scheme for protozero enums nested in another message: 176 instead of OuterClass_Enum_VALUE, the enum values will be just named 177 VALUE with the enum itself wrapped in a perfetto_pbzero_enum_OuterClass 178 namespace to prevent naming collisions. This will allow the users 179 to alias the enum directly and use throughout their code. 180 The exact name mangling scheme is a carry-over from libprotobuf and 181 an internal implementation detail, so nobody should be relying on that. 182 * Added protozero::EnumToString() to convert enum keys to string literals. 183 184 185v27.1 - 2022-07-11: 186 SDK: 187 * Added an API for shutting down Perfetto. 188 189 190v27.0 - 2022-07-01: 191 Tracing service and probes: 192 * Fix rare crash due to watchdog timeout being too short. 193 Trace Processor: 194 * Removed enable_perfetto_x64_cpu_opt by default for x64 MacOS 195 since it caused issues for CIs. 196 * Improved performance of filtering and sorting on most queries. 197 UI: 198 * Changed sorting of process groups to take slice count and presence of 199 perf profiles into account. 200 SDK: 201 * 202 203 204v26.1 - 2022-06-13: 205 Trace Processor: 206 * Fixed build failures on Windows. 207 208 209v26.0 - 2022-06-13: 210 Tracing service and probes: 211 * Added wildcard (*) support when targeting processes by their command line 212 in the Android perf profiler ("linux.perf" data source) and Java heap 213 snapshots ("android.java_hprof"). 214 * Added support for kernel thread sampling, and kernel-only callstacks in 215 the Android perf profiler. 216 * Fixed rare crash when parsing zero-length ftrace __data_loc strings. 217 * Fixed rare crash on 4.19 kernel when encountering unexpected zero-padded 218 ftrace pages. 219 * Removed capturing of thread_time_in_state (per-UID, per-OOM-adj time). 220 The data was unused and subsumed by correlating sched data with power 221 rail monitors. 222 Trace Processor: 223 * Added CREATE_VIEW_FUNCTION operator to define a SQL function that can 224 return a temporary table and yield multiple rows and columns. 225 * Changed kernel threads to be represented as single-thread processes in 226 Linux system traces. The (incorrect) legacy behaviour was to treat them 227 as threads of the kthreadd process. 228 * Added ABS_TIME_STR function which converts a trace timestamp to 229 an ISO8601 string. 230 * Added ingestion for phase='R' events, used by performance.{now,mark}(). 231 * Changed 'trace_to_text' to be named 'traceconv'. The source 232 location also moved from 'tools/trace_to_text' to 'src/traceconv'. 233 * Changed compiler flags, added -mavx2. The previous patch in v22.0 was 234 supposed to add AVX2 support but added only AVX. 235 * Changed the handling of the last per-cpu sched slices: rather than 236 extending the last event to the end of the trace, the last scheduling 237 event has a -1 duration. UIs are supposed to deal with visual extension. 238 * Removed android_thread_time_in_state metric. It was an experiment and was 239 unused. 240 * Removed `instant` table. All instant events are now 0-duration events in 241 the `slice` table. 242 * Removed the /raw_query REST endpoint from --httpd. This will break very 243 old clients that have not switched over the new streaming-based /query 244 endoint or even newer /websocket. 245 UI: 246 * Changed detail panel to separate slice args from generic slice properties. 247 * Automatically enabled sched_compact when generating trace configs for 248 Android S+ targets. 249 SDK: 250 * Added option for recording thread CPU times at the beginning and end of 251 each slice. 252 * Added perfetto::DynamicString() to use non-literal strings as event names 253 in the TRACE_EVENT API. 254 * Remove the pre-SDK consumer_api_deprecated interface. It was introduced 255 for iorapd, now deleted from the Android tree. 256 257 258v25.0 - 2022-04-01: 259 Tracing service and probes: 260 * Added prebuilts for mac-arm64. 261 * Removed merged trace and config protos from Bazel. Embedder should 262 instead depend on the non-merged proto targets. 263 * Added FtraceConfig.disable_generic_events. If set, the ftrace data source 264 will not emit events for which it doesn't have a compile-time proto 265 message. 266 * Added ingestion support for cros_ec (CrOS sensors) ftrace events. 267 * Added ingestion support for kvm trace events. 268 * Added reporting of atrace failures. Now they are bubbled up to the UI 269 rather than causing atrace data to be silently missing. 270 Trace Processor: 271 * Added prebuilts for mac-arm64. 272 * Changed LIKE comparisions to be case-insenstive. This reverts the change 273 introduced in v22. GLOB should be used where case senstive searches are 274 desired; built-in metrics continue to require the use of GLOB. 275 * Added an optional dependency from trace processor onto a subset of 276 sources from llvm-project for function name demangling. Bazel embedders 277 might need to update their PERFETTO_CONFIG in perfetto_cfg.bzl to opt in 278 or out of the new dependency. See 279 perfetto/bazel/standalone/perfetto_cfg.bzl for details. 280 UI: 281 * Added flow arrows between binder transaction pairs (request/reply 282 and async send/async recv). 283 SDK: 284 * Added support for writing typed proto messages inside DebugAnnotations. 285 * Added support for delta encoding of timestamps for TrackEvents. 286 To disable it, refer to `disable_incremental_timestamps` flag in 287 `track_event_config.proto`. 288 Tools: 289 * Added support of gzip-compressed traces to traceconv. 290 * Changed `traceconv text` to use an internal proto->pbtx converter rather 291 than relying on libprotobuf. It could cause some small divergencies in the 292 output format vs past releases. 293 * Added tools/cpu_profile helper script to capture traces with callstack 294 samples. 295 296 297v24.2 - 2022-02-10: 298 SDK: 299 * Revert of incremental timestamps, introduced in v24.0. 300 Some clients were depending on non-incremental timestamps. 301 Future releases will re-enable this but offer an opt-out. 302 303 304v24.1 - 2022-02-09: 305 Tracing service and probes: 306 * Fixed build failures on Windows. 307 Trace Processor: 308 * Fixed build failures on Windows. 309 310 311v24.0 - 2022-02-08: 312 Tracing service and probes: 313 * Added "cpufreq_period_ms" in data source "linux.sys_stats" to poll 314 /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq periodically. 315 * Added support for Trusty TEE workqueue events. 316 * Added support for more PMU events in traced_perf. 317 * Changed output format of perfetto --query. Made the output more compact 318 and added a summary of ongoing tracing sessions for the caller UID. 319 * Changed timeout for traced stall detection from 2s to 4s. 320 * Changed internal buffer management to split trace filtering in smaller 321 tasks and avoid too large memory allocation when filtering. 322 * Fixed a bug that could cause producers to see Flush() requests after an 323 OnStop() and mis-behave if the tracing session is extremely short. 324 Trace Processor: 325 * Added support for passing multiple SQL statements to ExecuteQuery(). All 326 queries will be executed fully, with the returned iterator yielding rows 327 for the final statement. 328 * Added support for multi-line SQL comments; previously only single line 329 comments were supported. 330 UI: 331 * Added support for parsing instant events from legacy systrace formats. 332 * Added ingestion and visualization for inet_sock_set_state and 333 tcp_retransmit_skb events, showing TCP connections on dedicated tracks. 334 * Changed HTTP+RPC to use the /websocket endpoint available in newer 335 versions of trace_processor --httpd. 336 * Changed text selection/copy: now allowed by default for DOM elements. 337 * Changed search to also lookup slices by ID when the term is a number. 338 * Changed postMessage() API, suppressed confirmation dialog when the opener 339 is in the same origin, for cases when the UI is self-hosted. 340 SDK: 341 * Changed timestamps emitted by the SDK to be incremental by default, using 342 ClockSnapshot + TracePacketDefaults. 343 344 345v23.0 - 2022-01-11: 346 Tracing service and probes: 347 * Added workaround for a kernel ftrace bug causing some "comm" fields to be 348 not null-terminated. https://github.com/torvalds/linux/commit/f0a5157803 . 349 * Added ability to talk to the newer AIDL-based health hal in traced_probes. 350 It still falls back on the older HIDL interface for older devices. 351 Trace Processor: 352 * Changed the argument for the trace path in constructor of TraceProcessor 353 in the Python API from |file_path| to |trace|. 354 |file_path| is deprecated and may be removed in the future. 355 * Changed the Python API constructor. Now it takes a TraceProcessorConfig 356 instead of passing parameters directly. This may break existing code 357 but migration should be trivial (all current options are still 358 supported). 359 * Fixed a HTTP keepalive bug in trace_processor --httpd. The bug, introduced 360 in v22.0, caused each RPC request to close the connection, effectively 361 defeating the 'Connection: Keep-Alive', after each query made by the UI. 362 * Added parsing of netif_receive_skb events from proto traces. 363 * Added android_netperf metric based on netif events. 364 * Fixed a bug that would cause fetch errors when loading traces > 32 MB when 365 using trace_processor --httpd. 366 * Added a workaround to tokenize properly /proc/pid/cmdline for chrome 367 processes on Linux/CrOS. Chrome rewrites its cmdline replacing \0 -> ' '. 368 UI: 369 * 370 SDK: 371 * 372 373 374v22.1 - 2021-12-07: 375 Tracing service and probes: 376 * Added workaround for a Linux kernel bug causing some ftrace strings to 377 be non-null-terminated (https://github.com/torvalds/linux/commit/f0a5157). 378 Trace Processor: 379 * Fixed build failures on Windows. 380 381 382v22.0 - 2021-12-03: 383 Tracing service and probes: 384 * Added Android SDK version to the SystemInfo trace packet. 385 * Changed compiler flags. Assume recent x64 CPUs (-msse4.2 -mavx -mpopcnt). 386 This behavior affects only standalone builds and can be changed by setting 387 enable_perfetto_x64_cpu_opt=false in the GN args. 388 * The java heap profiler now rescans all the processes every time for 389 continous_dump_config. The scan_pids_only_on_start can be used to restore 390 the old behavior. 391 * Added support for building on ARM Macs. 392 * Added support for the rss_stat_throttled event on Android via 393 FtraceConfig.throttle_rss_stat. In newer Android kernels the base rss_stat 394 event is now unthrottled. rss_stat used to be throttled by a downstream 395 kernel change, unnecessary after https://lkml.org/lkml/2021/10/25/1411 . 396 atrace.rc configures throttling from userspace at boot. 397 * Fixed a bug that caused IPCs to stall traced and hit the watchdog if in 398 the middle of a suspend/resume. Switched from SND_TIMEO to poll(POLLOUT). 399 * Added "linux.sysfs_power" data source to poll /sys/class/power_supply/ 400 and report periodically battery charge and drain rate if supported. 401 * Add snapshotting for non-BOOTTIME ftrace clocks. This fixes handling of 402 ftrace events from old Linux kernel versions (i.e. 3.x) and adds 403 proper support for using the "global" clock rather than "boot". 404 Trace Processor: 405 * Speeded up proto trace ingestion by 2x (~20 MB/s -> ~40 MB/s). 406 * Changed LIKE comparisions to be case-senstive. This may break existing 407 queries but was a necessary from a performance perspective. 408 Going forward, GLOB must be used, instead of LIKE, for checked in metrics 409 to avoid unnecessary slowdowns. 410 * Changed compiler flags, assume recent x64 CPUs (see above). 411 * Changed how displayTimeUnit is handled in JSON traces to match catapult. 412 * Added websocket endpoint to RPC interface to reduce query latency. 413 * Added support for hot-reloading metrics (see //docs/analysis/metrics.md). 414 * Added ingestion support for non-BOOTTIME ftrace clocks. 415 UI: 416 * Added ability to save/restore record config. Remember last used config. 417 * Fixed bug causing the recording page to hold onto the USB interface making 418 adb unusable after a recording session. 419 SDK: 420 * Added UpdateDataSource() descriptor IPC endpoint to allow updates of the 421 data source capabilities (e.g., category list for track event). 422 423 424v21.0 - 2021-11-01: 425 Tracing service and probes: 426 * Added reporting of last 8 PERFETTO_LOG() entries and crash keys to 427 crash tombstones on Android. 428 * Changed kallsym parser to save 100ms for starting a tracing session with 429 enable_ksyms=true. 430 * Removed advertisement of the built-in data sources "android.heapprofd", 431 "android.java_hprof", "linux.perf" on Linux and other platforms. Built-in 432 data sources are only used to lazy-start daemons on Android OS. 433 * Changed ACL files on Android atrace.rc to support to up to 24 ftrace cpus. 434 No change on Linux which remains unlimited. 435 Trace Processor: 436 * Changed protobuf decoders to use less stack and fall back on heap sooner 437 (before: 16KB of stack per decoder, after: 1.6KB). It caused problems with 438 some embedders which use smaller per-thread stacks. 439 * Added support for SPAN OUTER JOIN on unpartitioned tables. 440 * Improved performance of as_pandas_dataframe() in the Python API by 16x. 441 UI: 442 * Added visualization of direct_reclaim ftrace events. 443 SDK: 444 * Added perfetto::{Flow,TerminatingFlow} to the track-event library. 445 446 447v20.1 - 2021-10-05: 448 Tracing service and probes: 449 * Fixed standalone Windows build. Updated the llvm-win toolchain. 450 451 452v20.0 - 2021-10-03: 453 Tracing service and probes: 454 * Removed DCHECK that would cause crashes when a debug build of the service 455 is used with a producer built with -DNDEBUG. 456 * Changed the service-side field-level filtering configuration protobuf 457 field number, because the feature had a bug. This is effectively 458 equivalent to deprecating the feature and reintroducing it under a 459 different name. 460 * Added support for boot tracing on Android. Early kernel tracing (prior to 461 the point when /data is mounted) is not yet supported. For instructions 462 see /docs/case-studies/android-boot-tracing.md . 463 Trace Processor: 464 * Added reqiurement of separating queries by semi-colon (;) followed by 465 new-line when specifying a query file with -q to trace processor shell. 466 * Added "ancestor_slice_by_stack" and "descendant_slice_by_stack" table 467 functions to walk up and down the slice stacks. 468 * Overhauled windowed sorting to be based on packet ordering and 469 lifecycle events inside the trace instead of time-based ordering. 470 * Removed |SortingMode::kForceFlushPeriodWindowedSort| due to changes to the 471 sorting algorithm, which is now based on Flush events rather than time. 472 Embedders should switch to |SortingMode::kDefaultHeuristics|. Other 473 SortingMode enum values are no-ops and will be removed in future versions. 474 UI: 475 * Added initial flamegraph support for traced_perf callstack samples. 476 * Added initial Pivot table for aggregation of userspace slices. The feature 477 is disabled by default for and requires manual enabling via 478 https://ui.perfetto.dev/#!/flags . 479 SDK: 480 * Changed DCHECK and DLOGs to be always disabled in SDK builds, regardless 481 of NDEBUG. 482 483 484v19.0 - 2021-09-02: 485 Tracing service and probes: 486 * Added ftrace clock reporting to the trace. 487 Trace Processor: 488 * Added support for longs/doubles to RUN_METRIC. 489 * Added power profile data for sunfish, redfin, and bramble. 490 * Added experimental Python library for computing slice breakdowns. 491 * Fixed parsing of JSON escape sequences. 492 * Fixed JSON trace detection. 493 UI: 494 * Added local cacheing of traces. Traces are reloaded in case of refresh or 495 tab being discarded by the browser. 496 * Added icon to distinguish metric-derived tracks. 497 * Added release channel selector to feature flags page. 498 * Fixed crash with null slice names. 499 SDK: 500 * Added some missing NESTABLE_ASYNC legacy trace macros. 501 * Fixed reporting of producer uid in --query. 502 * Fixed version numbering scheme for minor versions. Previously versions 503 were numbered as like v19.0.42 where 42 represented the number of commits 504 since the last major version release. This was ambiguous in the presence 505 of branches. Now versions are numbered like v19.0-ab12cd34 where ab12cd34 506 is the shortened Git commit-ish. 507 508 509v18.0 - 2021-08-02: 510 Tracing service and probes: 511 * Added cross-compiler toolchains for Linux-{arm,64} based on Debian Sid. 512 These will be used for generating monthly releases' prebuilts via LUCI. 513 Trace Processor: 514 * Added 'android_gpu' metric to report residency information for each GPU 515 frequency (via `trace_processor_shell --run-metrics android_gpu`). 516 * Removed the RawQuery RPC interface. 517 UI: 518 * Added a highlighted section to thread slices to visualize CPU time 519 (darker) verses wall time (lighter). 520 * Added global counter tracks for perf counters (e.g. "CPU 0 cycles", "CPU 0 521 instructions") when the 'linux.perf' data source (traced_perf) is used. 522 * Added a (feature) 'Flags' page to enable/disable individual metrics. 523 * Fixed races that could cause occasional crashes when loading a trace 524 from a permalink. 525 SDK: 526 * Fix undefined reference on ~TracingMuxerFake when building the SDK. 527 528 529v17.0 - 2021-07-02: 530 Tracing service and probes: 531 * Fixed a bug in ftrace parsing of absolute timestamps 532 (RINGBUF_TYPE_TIME_STAMP), encountered on Linux kernels 5.9+. 533 * Fixed a bug in --save-for-bugreport causing 0-length traces if the 534 selected trace declared one or more triggers in the config. 535 * Fixed a bug in tracebox causing the PERFETTO_PRODUCER_SOCK_NAME env 536 var to be ignored. 537 Trace Processor: 538 * Changed CORS headers of --httpd mode to allow only https://ui.perfetto.dev 539 and http://localhost:10000. This affects only CORS-aware browser clients. 540 * Added GPU frequency metrics. 541 UI: 542 * Fixed ADB connection issues ("unable to reset device") on Windows and Mac. 543 * Added caching of tracing in the cache storage so that the trace is 544 re-opened if a tab is killed (Chrome tab discarding or accidental CTRL+W). 545 SDK: 546 * Added support for writing track events using custom clock timestamps. 547 548 549v16.1 - 2021-06-08: 550 Tracing service and probes: 551 * Cherry-pick of r.android.com/1716718 which missed the v16 branch cut and 552 fixed MSVC 2019 builds. 553 554 555v16.0 - 2021-06-01: 556 Tracing service and probes: 557 * Added support for building most targets (including traced, SDK and 558 trace_processor_shell) from Windows using either clang-cl or MSVC 2019. 559 * Added tracebox, a monolithic binary to capture traces with one command 560 on Linux and older versions of Android (tested on Android Oreo). 561 * Added support for service-side field-level filtering of traces. The 562 consumer can pass a filter bytecode and ensure that non-allowed fields 563 are never emitted in output. 564 * Added reporting of service version and producer SDK version into the trace 565 and `perfetto --query`. 566 * Fixed compatibility with Android versions older than Pie (for sideloading) 567 which cause failures when trying to enable atrace categories. 568 Trace Processor: 569 * Added new RPC interface based on a bidirectional binary pipe. This allows 570 to simplify integration with out-of-process users. The existing --httpd 571 interface now exposes a single /rpc endpoint. Older endpoints are still 572 available for legacy clients. 573 * Added support for counters and instant events in JSON traces. 574 * Fixed support of displayTimeUnit in JSON traces. 575 UI: 576 * Added warning dialog when trying to use a trace_processor_shell --httpd 577 which is too old. 578 * Added warning dialog when trying to use a trace_processor_shell --httpd 579 RPC instance from more than one tab. 580 * Added links to convert the trace to JSON or systrace directly from the UI. 581 * Changed track sorting logic. Tracks are now sorted in groups (e.g., 582 scheduling tracks, summary tracks, frame timeline tracks). 583 * Fixed crashes happening flakily when pushing traces via window.open(). 584 585 586v15.0 - 2021-05-05: 587 Tracing service and probes: 588 * Added support for {host,target}=aarch64 standalone builds. 589 * Added --background cmdline switch to traced and traced_probes services. 590 * Changed trigger_perfetto to ignore unknown command line arguments to 591 preserve forward compatibility. 592 * Added -a / --app cmdline argument to tools/record_android_trace. 593 Trace Processor: 594 * Added sanitisation of keys in nested debug annotation dictionaries. 595 * Changed Android startup metric: count CPU time of JIT thread pool, report 596 timestamp of activities during startup. 597 * Changed android_surfaceflinger metric, added missed frame counters. 598 * Changed version of SQLite to 3.35.4. 599 * Fixed importing of JSON traces with decimal (sub-us) timestamp. 600 * Fixed prepending "debug." prefix to debug annotations with non-interned 601 names. 602 UI: 603 * Added support to visualize the lifetime of individual dmabuf allocations 604 as async slices (datasource: already existing ftrace dmabuf event). 605 * Fixed visualization of unfinished slices to extend to the end of the 606 viewport. 607 SDK: 608 * Added support for passing arbitrary number of debug annotations to 609 TRACE_EVENT and combining them with lambdas. 610 * Added support for writing typed TrackEvent arguments using TRACE_EVENT 611 inline without lambdas. 612 * Changed ConvertTimestampToTraceTimeNs to be a member of 613 TraceTimestampTraits<T> struct instead of a standalone function. 614 * Changed TracedValue to use nested DebugAnnotation proto instead of 615 DebugAnnotation::NestedValue. 616 617 618v14.0 - 2021-04-01: 619 Tracing service and probes: 620 * Added support for polling power rails on Android from the newer 621 IPowerStats AIDL interface (previously using only the HAL interface). 622 * Fixed native heap profiler crash when ABI of heapprofd and profiled 623 process mismatch. 624 * Changed encoding format of Anroid managed heap profiler to reduce heap 625 dump sizes by delta-encoding object IDs. 626 Trace Processor: 627 * Added activity create/resume, layout inflation and resource timings to 628 the Android startup metric. 629 * Added chrome metadata key/value pairs (e.g. chrome version) into the 630 `metadata` table with 'cr-' prefixed keys. 631 * Added dma-buf-based memory metrics reporting total/avg/min/max dmabuf 632 allocation per-dmabuf-heap and per-process. 633 * Removed |force_full_sort| flag from config. This has been replaced 634 by setting the sorting mode to force a full sort. 635 UI: 636 * Added tools/symbolize-ui-crash script to resolve crash reports via 637 TypeScript source maps. 638 * Fixed newlines when copying Android event log lines into the clipboard. 639 * Fixed crash when selecting "Did not finish" slices. 640 * Fixed OOM dialog to give actionable instructions when opening large traces 641 rather than suggesting to file a bug. 642 SDK: 643 * Added /meson.build for bundling /sdk/perfetto.{cc,h} in Meson builds. 644 * Added support for counter trace points with the TRACE_COUNTER macro. 645 646 647v13.0 - 2021-03-01: 648 Tracing service and probes: 649 * Added ability to sample callstacks using kernel tracepoints as timebase. 650 * Added abililty to record the perf timebase counter values into the trace, 651 both combined callstack+counter or counter-only. 652 * Added abillity to trigger traces based on VM pressure on Android. Requires 653 a dedicated tracing instance in $tracefs/instances/mm_events. 654 Trace Processor: 655 * Added sorting mode to trace processor config to specify how trace 656 processor should sort events. The |force_full_sort| flag has been 657 deprecated (with replacement) and will be removed in the next version. 658 * Added ingestion of frame timeline events into the 659 {expected,actual}_frame_timeline_slice tables. 660 * Added support for Mali's trace_marker_write ftrace event. 661 * Added memory metric based on newer android_fastrpc kernel events. 662 UI: 663 * Added flow events support for instant events and async tracks. 664 * Added support for Android frame timeline events. They allow inspecting 665 end-to-end expected vs actual app-to-surfaceflinger frame times. 666 * Added ability to switch between Canary and Stable channels in the UI. 667 * Added ability to drag&drop to open trace files. 668 * Changed UI serving infrastructure, old ui versions can be now retrieved by 669 directly opening https://ui.perfetto.dev/v12.1.269/ . 670 * Removed thread state track for threads that have no activity. 671 SDK: 672 * Use process start time hashed with the process id as a unique process 673 identifier, allowing multiple independent users of the SDK in the same 674 process to interleave their events on shared tracks. 675 * Record process and thread names into the trace. 676 * Add ring buffer tracing support, i.e., periodic clearing of incremental 677 state. 678 Misc: 679 * Convert python scripts to python3. 680 681 682v12.1 - 2021-02-01: 683 Misc: 684 * Fixed CHANGELOG which was missed in the 12.0 branch cut, causing 685 mis-labeling of the version code in the v12.x branch as v11.0..N 686 687 688v12.0 - 2021-02-01: 689 Tracing service and probes: 690 * Added more helpful error messages if the client library is used without 691 having been initialized. 692 * Added //tools/record_android_trace script to facilitate recording traces 693 from Android devices, automating start + stop-via-ctrl+c + pull + open. 694 * Added auto-attachment of traces to Android bugreports if dumpstate is 695 invoked when a trace with bugreport_score > 0 is running. 696 SDK: 697 * Added ability to customize the timestamp of events via 698 ConvertTimestampToTraceTimeNs(). 699 * Fixed support for category names that contain a space. 700 Trace Processor: 701 * Added ingestion and query support for Android end-to-end frame timing 702 events through the {actual, expected}_frame_timeline_slice tables. 703 * Added time-to-reportFullyDrawn (Android's API) to startup metrics. 704 * Fixed excessive memory usage when decoding traces containing callstacks 705 (https://github.com/google/perfetto/issues/83). 706 UI: 707 * Added ability to inspect the full trace config string from the 708 'Info and stats' page. 709 * Fixed 'TABLE/VIEW XXX already exists' in the Metrics page when running the 710 same metric twice. 711 * Fixed sorting of tracks using numeric sorting instead of lexicographic: 712 Thread {1, 2, 10, 11, 20} rather than Thread {1, 10, 11, 2, 20}. 713 * Fixed CSP-related bug that was preventing the UI to work on Firefox. 714 * Changed max zoom resolution to allow to zoom to sub-us events. 715 716 717v11.0 - 2021-01-01: 718 Tracing service and probes: 719 * Added trace packet interceptor API for rerouting trace data into 720 non-Perfetto systems. 721 * Added support for printing track events to the console. 722 * Added a way to observe track event tracing sessions starting and 723 stopping. 724 Trace Processor: 725 * Added "ancestor_slice" and "experimental_ancestor_stack_profile_callsite" 726 table functions to look up ancestors of CPU stack samples in profiler 727 tables. 728 * Added power metric reporting suspend/resume time periods. 729 UI: 730 * Fixed CPU time calculation in example queries. 731 * Added tracks to debug Android SystemUI jank. 732 733 734v10.0 - 2020-12-01: 735 Tracing service and probes: 736 * Fixed crash of tracing service if a client is unresponsive on the IPC 737 channel. Clients are disconnected if they don't respond to IPCs for 10s. 738 * Added cmdline arguments for integration within ChromeOS system image 739 (--{producer,consumer}-socket-{group,mode} for chmod-ing sockets). 740 * Changed path lookup logic for traced socket. /run/perfetto/ is used if the 741 directory exists, falling back on /tmp/ otherwise. 742 * Added support for kernel frame symbolization to the traced_perf callstack 743 sampler. 744 * Added support for resolving ftrace event arguments that require 745 symbolization against printk_format. 746 Trace Processor: 747 * Added .read command to inject a SQL query file, similar to the -q cmdline. 748 * Added trace-based metrics to root cause jank in Android System UI. 749 * Added symbolization support for ELF files on Windows for heap and 750 callstack profilers. 751 * Added support for symbolizing names of workqueue ftrace events. 752 * Improved Android startup metric with activity restart time. 753 UI: 754 * Added support for navigating flows with Ctrl+[ / Ctr+]. 755 * Improved query result panel, moved to the bottom group allowing 756 simultaneous query result and timeline views. 757 * Fixed data corruption when recording traces via the WebUSB-based Record 758 page in the UI. 759 760 761v9.0 - 2020-11-01: 762 Tracing service and probes: 763 * Added support for recording traces from a system service through the 764 client API. 765 * The client library now reconnects producers automatically if the 766 connection to the tracing service is lost. Also fixed crashes in ongoing 767 tracing sessions when a disconnect occurs. 768 * Added support for dpu and g2d ftrace events. 769 * Enabled commit batching and producer side patching of chunks. 770 * Add support for symbolizing kernel symbols for ftrace events. 771 Trace Processor: 772 * Fixed type affinity of string columns. 773 UI: 774 * Added initial support for running metrics from the UI. 775 * Added support for displaying all flows when a slice or area is selected. 776 * Highlight nodes that match the 'focus' string in the flamegraph. 777 * Added search within slice args. 778 * Fixed details panel height and moved query panel into details panel. 779 * Enabled re-sharing of postMessage traces by echoing back the original URL. 780 * Improved record page error messages. 781 782 783v8.0 - 2020-10-01: 784 Tracing service and probes: 785 * Added API for querying registered data sources and their capabilities. 786 * Added support for profiling heap allocations on Linux via LD_PRELOAD. 787 * Fixed possible race when initializing the consumer library. 788 * Fixed subtle bugs on systems with 16KB system pages. 789 Trace Processor: 790 * Added a table which lists available metrics. 791 * Added Python bindings on PyPi in the 'perfetto' package. 792 * Added support for running trace_processor_shell on Android. 793 * Added per-process metrics for GPU memory usage. 794 * Added support for exporting flow events to JSON. 795 * Added dynamic tables for navigating between slices of flows. 796 UI: 797 * Changed time marking: horizontal selection doesn't gray out anymore, 798 pressing 'm' marks the range. 799 * Added initial support for displaying flow event arrows. 800 * Improved ordering of all thread tracks under process grouping. 801 * Fixed UI crashes due to metric errors 802 * Fixed selection of thread state slices. 803 804 805v7.0 - 2020-09-01: 806 Tracing service and probes: 807 * Added auto-reconnection to the SDK. Tracing::Initialize() now retries in 808 the background, instead of failing, if the tracing service is unrechable. 809 * Added support for recording cpuhp (CPU hotplug) ftrace events. 810 * Fixed heap profiling unwinding on multi-ABI systems. 811 * Fixed reporting of live objects in the native heap profiler when using 812 --dump-at-max. 813 * Fixed crash when writing trace events with field nesting level > 10. 814 Trace Processor: 815 * Added Python bindings, see 816 https://perfetto.dev/docs/analysis/trace-processor#python-api . 817 * Added ingestion for Chrome instant events and Chrome flow events. 818 * Added ingestion for Android GPU memory events and sched_blocked_reason. 819 * Added WebView power metric. 820 * Added support for WSL1 where Async I/O is not available. 821 * Improved detection of Android suspend/resume events. 822 UI: 823 * Added GPU memory recording controls and ingestion code. Requires a recent 824 Android 12+ kernel. 825 * Added details panel for flow events, showed when the user selects a slice 826 involved in a flow (arrows in the UI are still being worked on). 827 * Added instant events rendering. 828 * Added Google Analytics. 829 * Fixed I/O thread-states in 4.14 kernels to deal with the removal of 830 wake-kill using sched_blocked_reason. 831 * Fixed "Perfetto UI started debugging this browser" showing when opening 832 the UI and the Chrome extension is installed. 833 Misc: 834 * Update language to comply with Android's inclusive language guidance. 835 836 837v6.0 - 2020-08-01: 838 Tracing service and probes: 839 * Added ftrace thermal events. 840 * Added support for custom allocators to the heap profiler. Allows 841 developers to report memory allocations that are not done through malloc. 842 * Added detailed timestamping of key tracing session events. 843 * Added support for building tracing services on CrOS (system-wide tracing). 844 * Fixed filtering out of stale ftrace data that predates the beginning of 845 the tracing session. 846 Trace Processor: 847 * Improved profile symbolizer. PERFETTO_SYMBOLIZER_MODE=index discovers 848 symbol files by build id rather than name. 849 * Added screen-state Android metrics. 850 UI: 851 * Added 'Info and stats' page to debug data losses and trace stats. 852 * Added full cmdline to process detail panel. 853 * Improved performance of async tracks using quantized queries. 854 * Improved performance of counter and slice tracks for long traces by 855 pre-caching quantized track data. 856 * Improved actionablility of crash dialog when the Wasm module OOMs. 857 858 859v5.0 - 2020-07-01: 860 Tracing service and probes: 861 * Added gpu_mem_total ftrace event. 862 * Added TrustZone (scm start/end) event. 863 * Added protos for GPU memory tracking and updated render stages proto. 864 * Added time_in_state probe for Android (CPU time broken down by frequency). 865 866 Trace Processor: 867 * Added ingestion of IRQ and SoftIRQ events. 868 * Added ingestion of workqueue events. KAddr symbolization still missing. 869 * Added ingestion of voltage regulators and board clock change events. 870 * Added ingestion of new ION ion_buffer_create/destroy events. 871 * Added ingestion of TrustZone (scm start/end) events. 872 * Added SurfaceFlinger derived events (tracking of missed frames). 873 * Changed parsing of scheduler task state on 4.14 kernels. 874 * Changed importing of Java heap graphs: allow partial dumps. 875 * Improved performance of the SQL query engine. 876 877 UI: 878 * Added dedicated query page for custom SQL queries. 879 * Added navigation links for Binder slices. 880 * Removed overview summary mode when zoomed out. 881 * Fixed recording page when targeting Android P. 882 * Improved slice pan/zoom performance by quantizing. 883