-
Notifications
You must be signed in to change notification settings - Fork 360
/
CHANGELOG
1356 lines (1234 loc) · 64.3 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Unreleased:
Tracing service and probes:
* Add `--clone-by-name` to the perfetto command line. This allows cloning a
tracing session by its unique_session_name.
SQL Standard library:
* Removed the `linux_device_track` table. Linux RPM (runtime power
management) tracks formerly in this table now can be found in the `track`
table with `classification` `linux_rpm`.
* Removed the `energy_counter_track` table. Android energy estimate
breakdown tracks formerly in this table now can be found in the `track`
table with `classification` `android_energy_estimation_breakdown`.
* Removed the `energy_per_uid_counter_track` table. Android energy estimate
breakdown tracks formerly in this table now can be found in the `track`
table with `classification` `android_energy_estimation_breakdown_per_uid`.
* Moved the `gpu_work_period_track` table into the `android.gpu.work_period`
standard library module and renamed it to `android_gpu_work_period_track`.
* Removed the `irq_counter_track` table. Irq counter tracks formerly in this
table now can be found in the `track` table with `classification`
`irq_counter`.
* Removed the `softirq_counter_track` table. Softirq counter tracks formerly
in this table now can be found in the `track` table with `classification`
`softirq_counter`.
* Removed the `uid_counter_track` table. It was redundant as no data was
inserted directly into it.
* Removed the `uid_track` table. It was redundant as no data was
inserted directly into it.
* Removed `common` package. It has been deprecated since `v42` and most
functionality has been moved into other packages. Notably, the time
conversion functions can be found in `time.conversion` module, and
`thread_slice` is available with `slices.with_context`.
Trace Processor:
*
UI:
*
SDK:
*
v48.1 - 2024-10-14:
SDK:
* Fix build with MSVC.
v48.0 - 2024-10-11:
Tracing service and probes:
* Improved accuracy of ftrace event cropping when there are multiple
concurrent tracing sessions. See `previous_bundle_end_timestamp` in
ftrace_event_bundle.proto.
* Increased watchdog timeout to 180s from 30s to make watchdog crashes
much less likely when system is under heavy load.
SQL Standard library:
* Improved CPU cycles calculation in `linux.cpu.utilization` modules:
`process`, `system` and `thread` by fixing a bug responsible for too high
CPU cycles values.
* Introduces functions responsible for calculating CPU cycles with
breakdown by CPU, thread, process and slice for a given interval.
* Added `linux.perf.samples` module for easy querying of perf samples
in traces.
* Added `stacks.cpu_profiling` module for easy querying of all CPU
profiling data in traces.
Trace Processor:
* Added (partial) support for the Gecko (Firefox) JSON profiler format.
Parsing is optimized for CPU profiling collected with `perf` and converted
to the Gecko format. Only parsing of samples is supported; parsing of
markers and any other features (e.g. colours) is *not* supported.
* Added (partial) suppoort for the perf script text format from both perf
and simpleperf. Only parsing files with the default formating or with pids
included (i.e. `-F +pid`) is supported. Any other formatting options are
*not* supported.
* Added support for parsing non-streaming ART method tracing format.
* Added support for parsing GZIP files with multiple gzip streams.
* Added support for parsing V8 CPU profling samples from proto traces.
u * Renamed Trace Processor's C++ method `RegisterSqlModule()` to
`RegisterSqlPackage()`, which better represents the module/package
relationship. Package is the top level grouping of modules, which are
objects being included with `INCLUDE PERFETTO MODULE`.
`RegisterSqlModule()` is still available and runs `RegisterSqlPackage()`.
`RegisterSqlModule()` will be deprecated in v50.0.
UI:
* Scheduling wakeup information now reflects whether the wakeup came
from an interrupt context. The per-cpu scheduling tracks now show only
non-interrupt wakeups, while the per-thread thread state tracks either
link to an exact waker slice or state that the wakeup is from an
interrupt. Older traces that are recorded without interrupt context
information treat all wakeups as non-interrupt.
* Nest global/user async tracks according to their parent/child relationship
in the trace.
* Introduced new workspace API which allows nested tracks & multiple
workspace support.
* Introduced middle ellipsis in track titles when title text is longer than
the available space, while preserving the start and end of title text &
add popup of full title text on hover.
* Fixed spurious judder issue in popups with tall content.
* Fixed bug where marker durations were not rendered on selected markers.
* Removed ChromeScrollJank V1 track (V2 should be used from now on).
* Major internal changes (affecting pugin developers and core contributors):
* Removed legacy selection types, use track event selection types going
forward for all single event selections.
* Details panels are now attached to the track rather than registered
separately.
* Introduced `registerSqlSelectionResolver`, which allow plugins to add
handlers allowing other parts of the codebase to make selection on
tracks from other plugins based on a sql table name and id.
* Changed lifetime of track instances; they are now created on trace load
by plugins and survive the lifetime of the trace, rather than getting
created and destroyed as they appear/disappear on the timeline.
* Fix circular dependencies and turn future instances into errors.
SDK:
*
v47.0 - 2024-08-07:
SQL Standard library:
* Removed `cpu.cpus` and `cpu.size` modules. The functions inside
for guessing core type were inaccurate and often misleading.
There is no replacement for these as there is no accurate data
source available.
* Moved `cpu.utilization` package to `linux.cpu.utilization`. The
functionality inside this package only works properly on Linux
and Linux derived OSes (e.g. Android).
* Moved `cpu.freq` module to `linux.cpu.frequency` and renamed
`cpu_freq_counters` to `cpu_frequency_counters` for the same
reason as above.
* Moved `gpu.frequency` to `android.gpu.frequency` for the same reason as
above.
* Moved `cpu.idle` module to `linux.cpu.idle` or `linux.cpu.idle_stats` for
the same reason as above.
* Moved content of `linux.cpu_idle` into `linux.cpu.idle` and
`linux.cpu.idle_stats` to make it consistent with above changes.
* Moved `memory.android.gpu` to `android.memory.gpu` to make it consistent
with above changes.`
* Moved contents of `memory.linux.process` to `linux.memory.process` and
`android.memory.process` to make it consistent with above changes.
* Moved `memory.linux.high_watermark` to `linux.memory.high_watermark` to
make it consistent with above changes.
* Moved `memory.heap_graph_dominator_tree` to
`android.memory.heap_graph.dominator_tree`. This is to allow for the
addition of more modules related to heap graphs.
* Added `linux_kernel_threads` table to `linux.threads` module.
Trace Processor:
* Change `NotifyEndOfFile` method to return a Status object. For backwards
compatibility, this value can be ignored but in the future a [[nodiscard]]
annotation will be added.
* Added `CREATE PERFETTO INDEX` to add sqlite-like indexes to Perfetto
tables. Has the same API as `CREATE INDEX`.
UI:
* Updated to Typescript 5.5.2, lib es2022, & upreved various packages.
* Made `Disposable`, `DisposableStack`, and their async variants available
to use in the UI.
* Vastly improved flamegraph.
* Added track filter which can be used to search for tracks by name.
* Added Wattson cpu power estimation plugin.
* Added option to show thread slice ancestor/descendant slices in thread
slice details panel context menu.
* Added feature where plugin can ask tracks to be automatically pinned when
adding tracks on trace load.
* Fixed inconsistent y-range for all CPU SS tracks.
* Switched to using explicit de/serialization when creating/loading
permalinks.
* Improved sched slice details query efficiency.
* Added `TagInput` widget.
* Added `ui/format-sources` script to run eslint and prettier in one go.
* Reduced number of circular imports.
* Added `SharedAsyncDisposable` for management of shared async resources.
* Fixed rendering of negative counter tracks.
* Improved data loss notification using a popup
* Tidied up `TrackDescriptor`.
* Added Android trace probes for ChromeOS
* Added feature to try reconnect when websocket connection is lost.
* Fixed bug in 1ns event rendering.
* Tidied up details panel font sizes and weights.
* Added segmented buttons widget.
* Added 'main thread' chip to main thread tracks.
* Added plugin API to add menu items to the sidebar.
* Added `onTraceReady` plugin hook.
* Various clean-ups and bugfixes.
v46.0 - 2024-06-13:
SQL Standard library:
* Added megacycles support to CPU package. Added tables:
`cpu_cycles_per_process`, `cpu_cycles_per_thread` and
`cpu_cycles_per_cpu`.
* Improved `memory` package. Added `memory.linux.process`,
`memory.linux.high_watermark` and `memory.android.gpu` modules.
* Created `gpu` package with `gpu.frequency` module.
* Migrated `sched.utilization` package to `cpu.utilization`.
Trace Processor:
* Added "time to initial display" and "time to full display" metrics to
the Android startup metric.
UI:
* Added plugin for synchronizing two instances of the UI - search for
'Enable timeline sync with other Perfetto UI tabs' in the command palette.
* Add builtin prompt functionality to the plugin API:
I.e. `await PluginContextTrace.prompt('...')`
* Fixed various bits of tech debt.
SDK:
* The TRACE_COUNTER macro and CounterTrack constructor no longer accept
`const char *` track names. In case your code fails to compile,
https://perfetto.dev/docs/instrumentation/track-events#dynamic-event-names
explains how to fix the problem.
v45.0 - 2024-05-09:
Trace Processor:
* Optimised single column `DISTINCT` queries.
* Optimised `LIMIT` and `OFFSET` queries.
SQL Standard library:
* Improved support for querying startups on Android 9 (API level 28) and
below. Available in `android.startup.startups` module.
* Added tables for querying "Time To Initial Display" and "Time To Full
Display" metrics for app startups. Available in new module
`android.startup.time_to_display`.
* Added table for querying hardware power rail counters in new
`android.power_rails` module.
UI:
* Add tracks to the list of searchable items.
* Use mipmaps to improve track query performance on large traces.
* Fix slow scrolling bug in ftrace explorer tab on low DPI machines.
* Overhaul track decider queries to improve trace load times.
* Add track
* Tidy up command names & remove some example ones.
* Remove arg auto-completion in pivot table.
* Show dominator tree views by default.
* Fix counter event selection off-by-one error.
* Add viewport control to the plugin API.
* Sticky track titles to improve track button accessibility in tall tracks.
* A handful of small bugfixes.
SDK:
* The TRACE_EVENT macro used to reject `const char *` event names: either
`StaticString` or `DynamicString` needed to be specified. In the last year
(since https://r.android.com/2494614), TRACE_EVENT mistakenly accepted
`const char *` as an event name. This has been fixed now. In case your
code fails to compile,
https://perfetto.dev/docs/instrumentation/track-events#dynamic-event-names
explains how to fix the problem.
v44.0 - 2024-04-10:
Trace Processor:
* New modules added to standard library: `frames.timeline`,
`frame.per_frame_metrics`, `sched.time_in_state`.
UI:
* Per-cpu scheduling tracks now distinguish real-time priority threads with
a hatched pattern and name prefix. Based on priority during switch-in.
* Added ftrace event cropping for traces recorded by perfetto v44+.
Events are ignored if they precede the earliest timestamp covered by all
per-cpu data streams. This should significantly improve the presentation
of RING_BUFFER traces, removing artifacts such as never-ending slices
starting at the beginning of the trace.
* Significantly improved trace load times.
* Improved counter track view modes, including log scale, expanded view, and
the ability for plugin authors to link scales of several counter tracks
together.
* Add dominated size and objects to Java heap graph view.
Added hotkey Q to open and close bottom drawer.
* Fixed bug where timeline header and tracks could become horizontally
misaligned when using browser zoom.
* Fixed crash when hot-reloading Sass during development.
* Fixed bug where crashed debug tracks could not be closed.
* Fixed missing flame graph details for area selections.
* Consistent reporting of durations for incomplete slices.
* Switch to using prettier for formatting TS & Sass instead of ESLint.
SDK:
* "track_event" categories are disabled by default in the C API, if they
don't match anything in the data source config. This behavior differs from
the C++ API. Configs should include either `enabled_categories: "*"` or
`disable_categories: "*"` to explicitly specify the desired behavior that
work both for C and C++.
v43.2 - 2024-03-07:
UI:
* Added redirection to pinned UI version when using
`trace_processor_shell --httpd` and pinned version is available.
v43.1 - 2024-03-05:
Tracing service and probes:
* Cherry-pick of https://r.android.com/2988674, which fixes the android x86
standalone build.
v43.0 - 2024-03-05:
Tracing service and probes:
* Buffers marked as `transfer_on_clone` will be flushed independently when
cloning.
* ftrace: added drain_buffer_percent option to read kernel ring buffer
based on occupancy in addition to existing periodic reads. Requires Linux
kernel v6.1+.
* ftrace: changed default kernel per-cpu ring buffer sizes if a config
doesn't request an explicit size via buffer_size_kb. Added
buffer_size_lower_bound option that lets the service choose a bigger ring
buffer size than requested.
* "linux.process_stats" data source: added options to record: process age,
time spent running in userspace, and time spent running in kernel mode,
using /proc/pid/stat. See "record_process_age" and
"record_process_runtime" options.
Trace Processor:
* Added `decompress_packets` mode to the traceconv tool.
* Support memory mapped file access on Windows.
* Deprecated `common` standard library module, it will be removed by v45.
Some of the functionality have been migrated to other parts of standard
library.
UI:
* Added a "defaultPlugins" list to allow control over which plugins are
enabled by default.
* Added a feature to allow enabling/disabling plugins permanently from the
plugins page.
* Added plugin load times to the plugin page.
* Added scrolling to the pinned track area.
* Added commands for expanding and closing all tracks.
* Added {expand,collapse}GroupsByPredicate to plugin API.
* Added SimpleSliceTrack & SimpleCounterTrack which have the same
functionality of debug tracks but may be added on trace load from within
plugins.
* Added naive track crash containment, which means tracks that crash should
not crash the entire UI.
* Don't render "idle" kernel thread slices in thread state tracks.
* Fixed crash when using autofill in text inputs in chrome.
* Fixed bug where "incomplete" slices were sometimes not rendered.
* Fixed crash when calls to CacheStorage fail via promise rejection.
* Fixed bug causing slices to occasionally disappear in tracks v2.
* Fixes crash in tracksV2 when visible window is negative.
* Fix bug when toggling the sidebar without a trace loaded would either
crash the UI or simply not work.
* Various TabsV2 QoL improvements.
* Various AndroidLongBatteryTracing plugin improvements.
v42.0 - 2024-02-02:
Tracing service and probes:
* Linux/Android: kernel scheduling data (sched_switch and sched_waking
ftrace events) is now serialised in a more compact format by default
(previously required setting ftrace_config.compact_sched.enabled).
UI:
* Added "Realtime (Trace TZ)" timestamp formatting option to see timestamps
in the local time of the traced device. It requires recent versions of the
tracing service which set the system_info.timezone_off_mins field.
* Added tab support to the plugin API.
* Added a plugin to improve visualization of Android power traces containing
ODPM (on-device power rail monitor) data.
* Added support to attach the UI via ?rpc_port=1234 to multiple instances of
trace_processor --httpd --http-port=1234 (see UI docs).
* Fixed OOM detection message on in-memory tables.
* Fixed rendering of events at the every beginning and end of the trace.
* Fixed rendering of low density slices.
* Fixed bug in filterVisibleSlices (Thanks to Liangliang Sui).
SDK:
* Fixed a bug that would cause DataSource::OnStop to be called twice upon
service disconnection with HandleStopAsynchronously().
* Fixed a long standing bug that caused the last TracePacket for every
sequence to be lost during scraping, for data sources that do not support
flushing. The fix works with old versions of the tracing service.
v41.0 - 2024-01-11:
Tracing service and probes:
* Added support for ADB_SERVER_SOCKET in the websocket bridge.
* Added support for reading Pressure Stall Information (PSI) from the kernel.
Trace Processor:
* Added capability to control trace processor using stdin/stdout when using
shell binary. This acts as a simpler alternative to the existing HTTP
control API.
* Fixed multiple edge-case issues in RestoreInitialTables.
SDK:
* Fixed a long standing bug that caused the last TrackEvent event for each
thread to be lost during scraping. The fix works with old versions of the
tracing service.
v40.0 - 2023-12-04:
Tracing service and probes:
* Added support for collecting battery voltage from the Android Power HAL.
* Added support for emitting machine id from producers on remote hosts.
Trace Processor:
* Added of flow id from trace as a column in the flow table.
* Fixed computation of trace_bounds table when using UI native acceleration.
UI:
* Switched to use "v2" querying and rendering system for tracks by default.
v39.0 - 2023-11-15:
Tracing service and probes:
* Added reporting of TZ offset under system_info.timezone_off_mins .
* Added no_flush option to DataSourceDescriptor to avoid unnecessary IPC
roundtrips to flush data sources like track_event that rely uniquely on
server-side scraping.
* Added support for running on Linux & Android systems configured with 16K
pagetables.
Trace Processor:
* Added android_boot metric.
* Added new PerfettoSQL syntax (CREATE PERFETTO VIEW) for adding schemas to views.
* Added support for the perf.data import format.
* Added dvfs and cpu_idle to stdlib.
UI:
* Added a new type of debug tracks: counter.
* Improved visualization of timestamps for durations.
v38.0 - 2023-10-10:
Tracing service and probes:
* Added capability to transfer and clear buffers on CLONE_SNAPSHOT.
* Added new service for relaying IPC messages from local producers to a
remote tracing instance.
Trace Processor:
* Added new PerfettoSQL syntax (INCLUDE PERFETTO MODULE) for including
tables/views/functions defined in SQL modules.
* Added new PerfettoSQL syntax (CREATE PERFETTO TABLE) for defining analytic
tables in SQL.
* Added new PerfettoSQL syntax (CREATE PERFETTO MACRO) for defining macros
in SQL.
* Added TO_REALTIME function to convert timestamps to the realtime clock.
* Added support for parsing binder_command and binder_return events.
UI:
* Added support for zooming when using deep-links.
* Added track for displaying screenshots in traces.
* Added support for displaying UTC timestamps.
* Added capability to list, search and debug plugin tracks.
* Added plugins with commands for pinning tracks for latency and large
screen debugging in Android.
v37.0 - 2023-08-10:
Tracing service and probes:
* Fixed a bug which would cause sessions cloned with CLONE_SNAPSHOT to not
inherit the trace filtering config.
* Fixed a bug that would cause flushes to be acked prematurely in
traced_probes if the android.package_list data source is present.
SDK:
* Fix build with MSVC.
UI:
* Added command palette (CTRL/Meta+Shift+P).
* Added grouping of global tracks into groups to reduce visual pollution.
* Added ability to toggle timestamps between trace / boot / wall time.
* Added recording UI for callstack sampler.
* Added "Viz" page to run chart query results with Vega-Lite.
* Highlight debuggable apps, which might have worse performance
characteristics, with a chip on the corresponding tracks.
Misc:
* master -> main branch migration. HEAD is now main, master is for now a
mirror and will become a stale frozen snapshot.
v36.1 - 2023-07-06:
Trace Processor:
* Fix compile on Windows.
v36.0 - 2023-07-05:
Tracing service and probes:
* Fixed unnecessary reads of thread files /proc when scraping process names.
Trace Processor:
* Rewrote filtering engine to be significantly faster on a wide range of
common queries.
* Significantly improved quality of PerfettoSQL error messages.
* Added API to retrieve last executed statement from iterator.
* Added support for filtering rows by a regex.
UI:
* Fixed flow events working for async tracks.
* Added table viewer for slice-like tables.
SDK:
* Reduce binary size impact of macro and template expansions.
v35.0 - 2023-06-07:
Tracing service and probes:
* Compression has been moved from perfetto_cmd to traced. Now compression is
supported even with write_into_file. The `compress_from_cli` config option
can be used to restore the old behavior.
* Changed the android.statsd datasource to batch multiple atoms into
a single trace packet. This improves performance and information
density.
Trace Processor:
* Fixed protozero parsing code to support field ids larger than
2^16 - 1. protozero now supports field ids up to 1,000,000
See https://github.com/google/perfetto/issues/510.
UI:
* Add support for deep links into the UI via query parameters.
* Fixed multiple issues around the display of track event log
messages See https://github.com/google/perfetto/issues/507.
v34.0 - 2023-05-02:
Tracing service and probes:
* --continuous-dump in tools/java_heap_dump now keeps recording until it
receives CTRL+C.
* Add CLONE_SNAPSHOT triggers for non-destructive snapshots of the trace
buffer without tracing interruption.
UI:
* Add support for parsing large integers from Trace Processor into
bigint. This is the default behaviour for unknown fields and can
be enabled specifically via the LONG and LONG_NULL column types.
SDK:
* Changed the type of the static constexpr metadata on protozero
generated bindings from a function returning the metadata to
metadata itself. For a field 'foo' the variable kFoo previously
defined as:
`static constexpr FieldMetadata_Foo kFoo() = { return {}; };`
it is now defined as:
`static constexpr FieldMetadata_Foo kFoo;`
This is a breaking change for users who directly access field
metadata.
* The new DataSourceBase::OnFlush() method allows users to properly handle
Flush requests.
v33.1 - 2023-03-03:
Identical to v33.0. Version was bumped to work around prebuilt infra failures.
v33.0 - 2023-03-02:
All:
* Switched to a C++17-only project by removing C++11 opt-out. This completes
the migration started in v31.0.
SDK:
* Tracing::Initialize() can be called more than once to initialize different
backends separately.
* Reduce binary size impact of autogenerated code.
v32.2 - 2023-02-16:
SDK:
* Fix MSVC warnings.
v32.1 - 2023-02-01:
Trace Processor:
* Fix build on windows.
v32.0 - 2023-02-01:
Tracing service and probes:
* Added an explicit TraceUuid packet. The tracing service now always
generates a UUID, even if TraceConfig.trace_uuid_msb/lsb is empty.
Trace Processor:
*
UI:
*
SDK:
* Add perfetto::Tracing::ActivateTriggers() function.
* Made it possible to declare track event categories in a C++ namespace
with PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE, allowing multiple category
sets to be used in one same translation unit. Correspondingly, the
PERFETTO_COMPONENT_EXPORT and PERFETTO_TRACK_EVENT_NAMESPACE macros have
been deprecated in favor of this new functionality.
* Deprecated the PERFETTO_COMPONENT_EXPORT macro in favor of
PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS.
* Added TracingInitArgs::enable_system_consumer configuration option, that
allows the linker to discard the consumer IPC, if not required.
v31.0 - 2022-11-10:
Tracing service and probes:
* Added support for collecting Android Trusty ftrace events.
* Fixed resetting syscall filter when recording selected syscalls.
Trace Processor:
* Improved error messages on SQL syntax errors.
* Improved performance of queries containing GLOB. Handling of GLOB
constraints now happens inside trace processor instead of SQLite.
* Added support for parsing Android Trusty ftrace events.
UI:
* Added support for metatracing UI code and integrate with trace processor
metatracing.
* Added support for scrolling to a time region using the postMessage API.
* Enabled Pivot table functionality by default.
* Fixed downloading of Java heap profiles.
SDK:
* Switched to require C++17 by default. A time-limited opt-out exists but
is planned to be removed in v34. Please contact us at
[email protected] if you have thoughts or concerns on this
move.
v30.0 - 2022-10-06:
Trace Processor:
* Fixed parsing of "R+" (preempted) and "I" (idle kernel thread) end states
of sched_switch events, collected on Linux kernels v4.14 and above.
Previously, preemption was not recognised, and idle was reported as
"x" (task dead). See commit c60a630cfe0.
* Add support for parsing sys_write syscalls.
* Remove the thread_slice table: all columns have moved to the slice table
and thread_slice exists as a view for backwards compatibility. This view
will also be removed in the future
* Add Base64 encode SQL function.
* Add support for importing function graph ftrace events.
* Add support for importing V4L2 ftrace events.
* Add support for importing virtio-video ftrace events.
UI:
* Fix downloading profiles from flamegraphs.
* Enable Pivot table support by default.
SDK:
* Add support for disallowing concurrent tracing sessions.
v29.0 - 2022-09-06:
Tracing service and probes:
* Add support for only tracing selected syscalls. By selecting only syscalls
of interest, usage of the trace buffer and performance impact on device
is reduced.
* Add support for parsing DSI ftrace events.
Trace Processor:
* Make calling NotifyEndOfFile more than once an error: this was deprecated
in v28. Flush should be used instead for all by the final call.
* Add parsing and ingestion for V4L2 events.
* Upgraded SQLite to 3.39.2.
UI:
* Add support for searching Android log events.
* Group kernel wakelock tracks into a single track group.
SDK:
* Added support for startup tracing. Tracing can be started in an app
before it connects to the tracing service.
The data sources which are started for startup tracing, will
be automatically adopted to normal tracing session once we start
normal tracing session.
* Added the |first_packet_on_sequence| boolean which is set the first packet
emitted on each TraceWriter.
v28.0 - 2022-08-02:
Tracing service and probes:
* Add android.statsd datasource.
* Removed log spam about sys.trace.traced_started in standalone builds.
* Changed kallsyms parsing in traced_probes (ftrace) to be always
synchronous (when starting the trace, rather than on the first batch).
* Added ksyms_mem_policy = KSYMS_RETAIN_FOREVER config to avoid destroying
and re-parsing kallsysm repeatedly in benchmark runs.
* Improve heap profiling shutdown: now the shared memory buffer where
alloc/free records are stored is properly flushed when stopping the data
source.
* Fixed race condition in the daemonization path of perfetto --background.
It would cause daemonization failures if the TTY is destroyed immediately.
Trace Processor:
* Deprecate calling NotifyEndOfFile more than once: Flush should instead be
used for all but the final call.
* Added ingestion and visualization of I2C transactions.
UI:
* Changed callstack sampling selection: selecting one sample now only shows
one stacktrace, selecting multiple samples shows the aggregation.
SDK:
* Fixed a bug (b/239725760) that would cause abstract sockets using the
"@name" syntax in PERFETTO_CONSUMER_SOCK_NAME/PERFETTO_PRODUCER_SOCK_NAME
to have a trailing \0 in the socket name. This breaks interoperability
with adb forwarding. This is a tracing protocol breaking change. Nobody
seems to be relying on @abstract syntax across different versions of
client vs service.
* Changed the mangling scheme for protozero enums nested in another message:
instead of OuterClass_Enum_VALUE, the enum values will be just named
VALUE with the enum itself wrapped in a perfetto_pbzero_enum_OuterClass
namespace to prevent naming collisions. This will allow the users
to alias the enum directly and use throughout their code.
The exact name mangling scheme is a carry-over from libprotobuf and
an internal implementation detail, so nobody should be relying on that.
* Added protozero::EnumToString() to convert enum keys to string literals.
v27.1 - 2022-07-11:
SDK:
* Added an API for shutting down Perfetto.
v27.0 - 2022-07-01:
Tracing service and probes:
* Fix rare crash due to watchdog timeout being too short.
Trace Processor:
* Removed enable_perfetto_x64_cpu_opt by default for x64 MacOS
since it caused issues for CIs.
* Improved performance of filtering and sorting on most queries.
UI:
* Changed sorting of process groups to take slice count and presence of
perf profiles into account.
SDK:
*
v26.1 - 2022-06-13:
Trace Processor:
* Fixed build failures on Windows.
v26.0 - 2022-06-13:
Tracing service and probes:
* Added wildcard (*) support when targeting processes by their command line
in the Android perf profiler ("linux.perf" data source) and Java heap
snapshots ("android.java_hprof").
* Added support for kernel thread sampling, and kernel-only callstacks in
the Android perf profiler.
* Fixed rare crash when parsing zero-length ftrace __data_loc strings.
* Fixed rare crash on 4.19 kernel when encountering unexpected zero-padded
ftrace pages.
* Removed capturing of thread_time_in_state (per-UID, per-OOM-adj time).
The data was unused and subsumed by correlating sched data with power
rail monitors.
Trace Processor:
* Added CREATE_VIEW_FUNCTION operator to define a SQL function that can
return a temporary table and yield multiple rows and columns.
* Changed kernel threads to be represented as single-thread processes in
Linux system traces. The (incorrect) legacy behaviour was to treat them
as threads of the kthreadd process.
* Added ABS_TIME_STR function which converts a trace timestamp to
an ISO8601 string.
* Added ingestion for phase='R' events, used by performance.{now,mark}().
* Changed 'trace_to_text' to be named 'traceconv'. The source
location also moved from 'tools/trace_to_text' to 'src/traceconv'.
* Changed compiler flags, added -mavx2. The previous patch in v22.0 was
supposed to add AVX2 support but added only AVX.
* Changed the handling of the last per-cpu sched slices: rather than
extending the last event to the end of the trace, the last scheduling
event has a -1 duration. UIs are supposed to deal with visual extension.
* Removed android_thread_time_in_state metric. It was an experiment and was
unused.
* Removed `instant` table. All instant events are now 0-duration events in
the `slice` table.
* Removed the /raw_query REST endpoint from --httpd. This will break very
old clients that have not switched over the new streaming-based /query
endoint or even newer /websocket.
UI:
* Changed detail panel to separate slice args from generic slice properties.
* Automatically enabled sched_compact when generating trace configs for
Android S+ targets.
SDK:
* Added option for recording thread CPU times at the beginning and end of
each slice.
* Added perfetto::DynamicString() to use non-literal strings as event names
in the TRACE_EVENT API.
* Remove the pre-SDK consumer_api_deprecated interface. It was introduced
for iorapd, now deleted from the Android tree.
v25.0 - 2022-04-01:
Tracing service and probes:
* Added prebuilts for mac-arm64.
* Removed merged trace and config protos from Bazel. Embedder should
instead depend on the non-merged proto targets.
* Added FtraceConfig.disable_generic_events. If set, the ftrace data source
will not emit events for which it doesn't have a compile-time proto
message.
* Added ingestion support for cros_ec (CrOS sensors) ftrace events.
* Added ingestion support for kvm trace events.
* Added reporting of atrace failures. Now they are bubbled up to the UI
rather than causing atrace data to be silently missing.
Trace Processor:
* Added prebuilts for mac-arm64.
* Changed LIKE comparisions to be case-insenstive. This reverts the change
introduced in v22. GLOB should be used where case senstive searches are
desired; built-in metrics continue to require the use of GLOB.
* Added an optional dependency from trace processor onto a subset of
sources from llvm-project for function name demangling. Bazel embedders
might need to update their PERFETTO_CONFIG in perfetto_cfg.bzl to opt in
or out of the new dependency. See
perfetto/bazel/standalone/perfetto_cfg.bzl for details.
UI:
* Added flow arrows between binder transaction pairs (request/reply
and async send/async recv).
SDK:
* Added support for writing typed proto messages inside DebugAnnotations.
* Added support for delta encoding of timestamps for TrackEvents.
To disable it, refer to `disable_incremental_timestamps` flag in
`track_event_config.proto`.
Tools:
* Added support of gzip-compressed traces to traceconv.
* Changed `traceconv text` to use an internal proto->pbtx converter rather
than relying on libprotobuf. It could cause some small divergencies in the
output format vs past releases.
* Added tools/cpu_profile helper script to capture traces with callstack
samples.
v24.2 - 2022-02-10:
SDK:
* Revert of incremental timestamps, introduced in v24.0.
Some clients were depending on non-incremental timestamps.
Future releases will re-enable this but offer an opt-out.
v24.1 - 2022-02-09:
Tracing service and probes:
* Fixed build failures on Windows.
Trace Processor:
* Fixed build failures on Windows.
v24.0 - 2022-02-08:
Tracing service and probes:
* Added "cpufreq_period_ms" in data source "linux.sys_stats" to poll
/sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq periodically.
* Added support for Trusty TEE workqueue events.
* Added support for more PMU events in traced_perf.
* Changed output format of perfetto --query. Made the output more compact
and added a summary of ongoing tracing sessions for the caller UID.
* Changed timeout for traced stall detection from 2s to 4s.
* Changed internal buffer management to split trace filtering in smaller
tasks and avoid too large memory allocation when filtering.
* Fixed a bug that could cause producers to see Flush() requests after an
OnStop() and mis-behave if the tracing session is extremely short.
Trace Processor:
* Added support for passing multiple SQL statements to ExecuteQuery(). All
queries will be executed fully, with the returned iterator yielding rows
for the final statement.
* Added support for multi-line SQL comments; previously only single line
comments were supported.
UI:
* Added support for parsing instant events from legacy systrace formats.
* Added ingestion and visualization for inet_sock_set_state and
tcp_retransmit_skb events, showing TCP connections on dedicated tracks.
* Changed HTTP+RPC to use the /websocket endpoint available in newer
versions of trace_processor --httpd.
* Changed text selection/copy: now allowed by default for DOM elements.
* Changed search to also lookup slices by ID when the term is a number.
* Changed postMessage() API, suppressed confirmation dialog when the opener
is in the same origin, for cases when the UI is self-hosted.
SDK:
* Changed timestamps emitted by the SDK to be incremental by default, using
ClockSnapshot + TracePacketDefaults.
v23.0 - 2022-01-11:
Tracing service and probes:
* Added workaround for a kernel ftrace bug causing some "comm" fields to be
not null-terminated. https://github.com/torvalds/linux/commit/f0a5157803 .
* Added ability to talk to the newer AIDL-based health hal in traced_probes.
It still falls back on the older HIDL interface for older devices.
Trace Processor:
* Changed the argument for the trace path in constructor of TraceProcessor
in the Python API from |file_path| to |trace|.
|file_path| is deprecated and may be removed in the future.
* Changed the Python API constructor. Now it takes a TraceProcessorConfig
instead of passing parameters directly. This may break existing code
but migration should be trivial (all current options are still
supported).
* Fixed a HTTP keepalive bug in trace_processor --httpd. The bug, introduced
in v22.0, caused each RPC request to close the connection, effectively
defeating the 'Connection: Keep-Alive', after each query made by the UI.
* Added parsing of netif_receive_skb events from proto traces.
* Added android_netperf metric based on netif events.
* Fixed a bug that would cause fetch errors when loading traces > 32 MB when
using trace_processor --httpd.
* Added a workaround to tokenize properly /proc/pid/cmdline for chrome
processes on Linux/CrOS. Chrome rewrites its cmdline replacing \0 -> ' '.
UI:
*
SDK:
*
v22.1 - 2021-12-07:
Tracing service and probes:
* Added workaround for a Linux kernel bug causing some ftrace strings to
be non-null-terminated (https://github.com/torvalds/linux/commit/f0a5157).
Trace Processor:
* Fixed build failures on Windows.
v22.0 - 2021-12-03:
Tracing service and probes:
* Added Android SDK version to the SystemInfo trace packet.
* Changed compiler flags. Assume recent x64 CPUs (-msse4.2 -mavx -mpopcnt).
This behavior affects only standalone builds and can be changed by setting
enable_perfetto_x64_cpu_opt=false in the GN args.
* The java heap profiler now rescans all the processes every time for
continous_dump_config. The scan_pids_only_on_start can be used to restore
the old behavior.
* Added support for building on ARM Macs.
* Added support for the rss_stat_throttled event on Android via
FtraceConfig.throttle_rss_stat. In newer Android kernels the base rss_stat
event is now unthrottled. rss_stat used to be throttled by a downstream
kernel change, unnecessary after https://lkml.org/lkml/2021/10/25/1411 .
atrace.rc configures throttling from userspace at boot.
* Fixed a bug that caused IPCs to stall traced and hit the watchdog if in
the middle of a suspend/resume. Switched from SND_TIMEO to poll(POLLOUT).
* Added "linux.sysfs_power" data source to poll /sys/class/power_supply/
and report periodically battery charge and drain rate if supported.
* Add snapshotting for non-BOOTTIME ftrace clocks. This fixes handling of
ftrace events from old Linux kernel versions (i.e. 3.x) and adds
proper support for using the "global" clock rather than "boot".
Trace Processor:
* Speeded up proto trace ingestion by 2x (~20 MB/s -> ~40 MB/s).
* Changed LIKE comparisions to be case-senstive. This may break existing
queries but was a necessary from a performance perspective.
Going forward, GLOB must be used, instead of LIKE, for checked in metrics
to avoid unnecessary slowdowns.
* Changed compiler flags, assume recent x64 CPUs (see above).
* Changed how displayTimeUnit is handled in JSON traces to match catapult.
* Added websocket endpoint to RPC interface to reduce query latency.
* Added support for hot-reloading metrics (see //docs/analysis/metrics.md).
* Added ingestion support for non-BOOTTIME ftrace clocks.
UI:
* Added ability to save/restore record config. Remember last used config.
* Fixed bug causing the recording page to hold onto the USB interface making
adb unusable after a recording session.
SDK:
* Added UpdateDataSource() descriptor IPC endpoint to allow updates of the
data source capabilities (e.g., category list for track event).
v21.0 - 2021-11-01:
Tracing service and probes:
* Added reporting of last 8 PERFETTO_LOG() entries and crash keys to
crash tombstones on Android.
* Changed kallsym parser to save 100ms for starting a tracing session with
enable_ksyms=true.
* Removed advertisement of the built-in data sources "android.heapprofd",
"android.java_hprof", "linux.perf" on Linux and other platforms. Built-in
data sources are only used to lazy-start daemons on Android OS.
* Changed ACL files on Android atrace.rc to support to up to 24 ftrace cpus.
No change on Linux which remains unlimited.
Trace Processor:
* Changed protobuf decoders to use less stack and fall back on heap sooner
(before: 16KB of stack per decoder, after: 1.6KB). It caused problems with
some embedders which use smaller per-thread stacks.
* Added support for SPAN OUTER JOIN on unpartitioned tables.
* Improved performance of as_pandas_dataframe() in the Python API by 16x.
UI:
* Added visualization of direct_reclaim ftrace events.
SDK:
* Added perfetto::{Flow,TerminatingFlow} to the track-event library.
v20.1 - 2021-10-05:
Tracing service and probes:
* Fixed standalone Windows build. Updated the llvm-win toolchain.
v20.0 - 2021-10-03:
Tracing service and probes:
* Removed DCHECK that would cause crashes when a debug build of the service
is used with a producer built with -DNDEBUG.
* Changed the service-side field-level filtering configuration protobuf
field number, because the feature had a bug. This is effectively
equivalent to deprecating the feature and reintroducing it under a
different name.
* Added support for boot tracing on Android. Early kernel tracing (prior to
the point when /data is mounted) is not yet supported. For instructions
see /docs/case-studies/android-boot-tracing.md .
Trace Processor:
* Added reqiurement of separating queries by semi-colon (;) followed by
new-line when specifying a query file with -q to trace processor shell.
* Added "ancestor_slice_by_stack" and "descendant_slice_by_stack" table
functions to walk up and down the slice stacks.
* Overhauled windowed sorting to be based on packet ordering and
lifecycle events inside the trace instead of time-based ordering.
* Removed |SortingMode::kForceFlushPeriodWindowedSort| due to changes to the
sorting algorithm, which is now based on Flush events rather than time.
Embedders should switch to |SortingMode::kDefaultHeuristics|. Other
SortingMode enum values are no-ops and will be removed in future versions.
UI:
* Added initial flamegraph support for traced_perf callstack samples.
* Added initial Pivot table for aggregation of userspace slices. The feature
is disabled by default for and requires manual enabling via
https://ui.perfetto.dev/#!/flags .
SDK:
* Changed DCHECK and DLOGs to be always disabled in SDK builds, regardless
of NDEBUG.
v19.0 - 2021-09-02:
Tracing service and probes:
* Added ftrace clock reporting to the trace.
Trace Processor:
* Added support for longs/doubles to RUN_METRIC.
* Added power profile data for sunfish, redfin, and bramble.
* Added experimental Python library for computing slice breakdowns.
* Fixed parsing of JSON escape sequences.
* Fixed JSON trace detection.
UI:
* Added local cacheing of traces. Traces are reloaded in case of refresh or
tab being discarded by the browser.
* Added icon to distinguish metric-derived tracks.
* Added release channel selector to feature flags page.
* Fixed crash with null slice names.
SDK:
* Added some missing NESTABLE_ASYNC legacy trace macros.
* Fixed reporting of producer uid in --query.
* Fixed version numbering scheme for minor versions. Previously versions
were numbered as like v19.0.42 where 42 represented the number of commits
since the last major version release. This was ambiguous in the presence
of branches. Now versions are numbered like v19.0-ab12cd34 where ab12cd34
is the shortened Git commit-ish.
v18.0 - 2021-08-02:
Tracing service and probes:
* Added cross-compiler toolchains for Linux-{arm,64} based on Debian Sid.
These will be used for generating monthly releases' prebuilts via LUCI.
Trace Processor:
* Added 'android_gpu' metric to report residency information for each GPU
frequency (via `trace_processor_shell --run-metrics android_gpu`).
* Removed the RawQuery RPC interface.
UI:
* Added a highlighted section to thread slices to visualize CPU time
(darker) verses wall time (lighter).
* Added global counter tracks for perf counters (e.g. "CPU 0 cycles", "CPU 0
instructions") when the 'linux.perf' data source (traced_perf) is used.
* Added a (feature) 'Flags' page to enable/disable individual metrics.
* Fixed races that could cause occasional crashes when loading a trace
from a permalink.
SDK:
* Fix undefined reference on ~TracingMuxerFake when building the SDK.