Commit Graph

3860 Commits

Author SHA1 Message Date
Nataniel Borges
a45b446526 Fix Lazy layers trace parsing in winscope
Plus some uncaught exceptions in the log

Bug: 211049519
Test: build winscope and open a trace
Change-Id: I04f52258069667e0da6342dabbcf2d46810804d3
2022-03-17 11:03:48 +01:00
Nataniel Borges
08815fa938 Freeze objects for performance
Frozen objects don't trigger Vue's reactive Observers and are significantly faster. With this changes, winscope can now load traces with over 100mb

Bug: 211049519
Test: build winscope and open a large trace
Change-Id: Iec9f91e408db734ce884cf846d5c2826ff346484
2022-03-10 11:42:16 +01:00
Nataniel Borges
07f9bcccf4 Use lazy file for LayerTraceEntry
This speeds up winscope by parsing each state only when necessary

Bug: 211049519
Test: build winscope and open a trace
Change-Id: I35e362ebcb7927887b2793697037984fa26de61c
2022-03-10 11:31:35 +01:00
Vishnu Nair
fe1da96bfb Winscope: Introduce ProxyClient class
Use new class to share device auth states, adb proxy
state and expose functions to talk to proxy.

This is the first step before adding new functionality to
winscope that will convert transaction traces to
layer traces. This functionality needs to be added in
DataInput.vue so this class will make it easier to read
the proxy state and use the proxy.

There should be no functional change in this cl.

Test: collect winscope traces via proxy
Bug: 200284593
Change-Id: Ic1f492ebec6c8dfd667d0828bb2d6779665b89c2
Merged-In: Ic1f492ebec6c8dfd667d0828bb2d6779665b89c2
(cherry picked from commit f89a0fbaa9)
2022-02-23 21:46:37 +00:00
Nataniel Borges
4230533310 Load all files that can be decoded from a zip
Even if some failures occur.

For example, a zip file with an mp4 recorded via MediaProjection
doesn't include the winscope metadata (b/140855415), but the trace
files within the zip should be nevertheless readable

Bug: 209843622
Test: build winscope and open a zip trace

Change-Id: I897ae5e1e0ea3d524c67d90318f9e63f80c6ce54
2022-02-09 15:06:12 +01:00
Nataniel Borges
a92deb8e5a Provide all the reasons a layer is invisible in Winscope
Currently we print only 1 reason and this makes debugging issues harder

Bug: 210476324
Test: compile winscope and dump a trace, check if multiple reasons for
invisible layers appear

Change-Id: Ia755c001a32a8bdcae3d8a31365ff1cfde28bb2f
2022-01-26 16:31:07 +01:00
Bob Badour
e0439a3892 Merge "Fix license texts." am: 632da0a501 am: b375f76135 am: 54cfa4d443 am: 298e88bee0
Original change: https://android-review.googlesource.com/c/platform/development/+/1955284

Change-Id: I1de3210c96da09546589794781f8f12cbe7ed128
2022-01-21 20:03:42 +00:00
Bob Badour
298e88bee0 Merge "Fix license texts." am: 632da0a501 am: b375f76135 am: 54cfa4d443
Original change: https://android-review.googlesource.com/c/platform/development/+/1955284

Change-Id: I1cb05b611a14d2ff227af99ca5b1cc1acd68d883
2022-01-21 19:44:54 +00:00
Bob Badour
082705bfb3 Fix license texts.
Push specific licenses down the tree toward the leaf directories.

Remove extra Apache 2.0 license texts--just use Android-Apache-2.0

Test: m nothing
Change-Id: Ibee25f75f5933699d6f43acdc192b2ada6823757
2022-01-20 19:04:52 +00:00
Treehugger Robot
d9e46f114d Merge "idegen: traversing all vendor-specific excludes" am: c65b20e6b6 am: 2f10578152 am: 61d873d3c8 am: 10e9b73f51
Original change: https://android-review.googlesource.com/c/platform/development/+/1264719

Change-Id: I9dac36bb0856d9501cf3e211d728ed27673b4dc2
2022-01-17 13:58:33 +00:00
Treehugger Robot
10e9b73f51 Merge "idegen: traversing all vendor-specific excludes" am: c65b20e6b6 am: 2f10578152 am: 61d873d3c8
Original change: https://android-review.googlesource.com/c/platform/development/+/1264719

Change-Id: I5d25e955d802a1c1c3779a769c68276f25b33aab
2022-01-17 13:46:37 +00:00
Treehugger Robot
c65b20e6b6 Merge "idegen: traversing all vendor-specific excludes" 2022-01-17 12:55:14 +00:00
Pablo Gamito
7222795a14 Wait longer for winscope_status to be ready
Traces take longer to be dumped and ready so we need to wait longer before the winscope_status is provided

Bug: 213372602

Test: Record a long trace and check that the proxy doesn't crash
Change-Id: I0a2aa9bfb667bdad3c909dabbc42b8e111cd3a16
2022-01-06 18:03:13 +01:00
Pablo Gamito
1bb3376354 Update flicker Region import to reflect package change
Change-Id: If3e83bbe1c08d473ca252c531d2e46fbde967a34
2022-01-06 18:03:08 +01:00
Treehugger Robot
7f8833f698 Merge "Remove checked in mkstubs .idea directory" am: 66e859ab9b am: 607fb95dd7 am: 6669d4a4dd am: 85be9d5466
Original change: https://android-review.googlesource.com/c/platform/development/+/1921070

Change-Id: Ic26f06b46de5b8782a2776e7b744ad829b8727ba
2021-12-14 06:48:23 +00:00
Treehugger Robot
85be9d5466 Merge "Remove checked in mkstubs .idea directory" am: 66e859ab9b am: 607fb95dd7 am: 6669d4a4dd
Original change: https://android-review.googlesource.com/c/platform/development/+/1921070

Change-Id: If80eaee23851301a7f64faa0b879090671fffb25
2021-12-14 06:32:15 +00:00
Colin Cross
f6d57ace26 Remove checked in mkstubs .idea directory
Bug: 210509169
Test: treehugger
Change-Id: Ia8cdae9a518abf4107928075447498edfe20d5c4
2021-12-13 20:14:31 -08:00
Nataniel Borges
26ed529f6a Compatibilize winscope with stackID on layer
Bug: 140855415
Bug: 207843938
Test: atest FlickerLibTest
Change-Id: Id81619fe04967649edd400be1a3765005350c1b5
2021-12-08 14:30:37 +01:00
Nataniel Borges
60e704c1de Support new transactions trace
Keep previous implementation as "transactions (legacy)"

The proxy is not yet able to generate traces because no
adb command is available at the moment.

Known issues:
- Enum fields are not translated into values in Winscope
  (only IntDef support)

Prepare the codebase for the new SF transaction tracing
Bug: 167521734
Test: run winscope and collect a transactions trace

Change-Id: Ie489ee1a63056377c1699e14df8de975c2978085
2021-12-07 11:03:37 +01:00
Nataniel Borges
9cc1353195 Fix property view for non flicker traces in winscope
There are 2 types of object whose properties can appear in the property
list: Flicker objects (WM/SF traces) and dictionaries
(IME/Accessibilty/Transactions).

While flicker objects have their properties directly in the main object,
those created by a call to the transform function have their properties
inside an obj property.

This CL makes flicker support both implementations

Bug: 167521734
Bug: 209452852
Test: run winscope and collect a transactions trace
Change-Id: I7103ef078cf62331fd45c45fd238173232993f47
2021-12-06 18:12:44 +01:00
TreeHugger Robot
5731ee392d Merge "Add isVirtual flag to SF trace display" 2021-12-03 16:19:06 +00:00
TreeHugger Robot
e2403e411c Merge "Display empty values when marking "Show defaults"" 2021-12-03 15:50:56 +00:00
Nataniel Borges
213cd34223 Display empty values when marking "Show defaults"
Previously `false` and `0` were ignored even when "Show defaults"
checkbox was marked.

Bug: 176906864
Test: build winscope, take a trace, mark show defaults, check if false
values appear on the property list

Change-Id: Ia114eea91c677e92f0bf4edd4a9e9107e014d90e
2021-12-03 15:50:28 +01:00
Nataniel Borges
49c9eadd0b Add isVirtual flag to SF trace display
Bug: 140855415
Test: build winscope, take a SF trace and check if the isVirtual flag
appears on the display

Change-Id: I5f6e5dba9f73f3464371166fb7ec8b589c3859c3
2021-12-03 15:49:27 +01:00
Nataniel Borges
329446be85 Add name information to all Winscope objects
This filter previously removed the information from all objects,
including SF displays

Bug: 140855415
Test: build winscope, compile a trace, check if name is visible
Change-Id: I62563595298f70444333289a2a22635aca43c265
2021-12-03 15:32:58 +01:00
TreeHugger Robot
a593541a36 Merge changes Ia70a9794,Iae900bcb
* changes:
  Add ability to specify name for trace
  Add feedback when dragging on the right drop area for file uploads
2021-11-15 22:15:07 +00:00
TreeHugger Robot
1127a885ca Merge "Polish design of Winscope dropbox" 2021-11-15 22:13:48 +00:00
Pablo Gamito
8e3d54740b Add ability to specify name for trace
Bug: 205573920
Change-Id: Ia70a97945db80765561fce2176fa2babcdd4bf19
2021-11-15 22:09:32 +01:00
Pablo Gamito
85f418ba25 Polish design of Winscope dropbox
Make sure loading spinner is center aligned

Ensure the size of dropbox remains the same before and while loaded so it doesn't look like it's flickering

Make dropbox clickable to allow for intuitive clicking of dropbox area to open file viewer

Bug: 206214877
Change-Id: Icc5c2bdfce9fd26c3ff6f040f85a289859cfd3ca
2021-11-15 22:09:32 +01:00
Pablo Gamito
f645098e90 Add feedback when dragging on the right drop area for file uploads
Bug: 206214877
Change-Id: Iae900bcbe213e018a323ae5085af4ae0f7e96cfb
2021-11-15 22:09:32 +01:00
Pablo Gamito
f38b9f1f17 Remove debugging log messages
Change-Id: I621408b3edf2c6e12f6bc99cc0e2dffc2db1a555
2021-11-15 11:52:35 +01:00
Nataniel Borges
d5bd29fa0a Add TRACE_BUFFERS configuration for SF trace in winscope
Create a new checkbox in the UI and update the proxy
Test: build winscope and take a trace

Change-Id: Ib57da2fdee6b65dbaa4ef7b482b28cc1a73529ca
2021-11-04 17:36:59 +01:00
TreeHugger Robot
697db8c073 Merge "Case insensitive filter on winscope" 2021-10-25 19:29:16 +00:00
TreeHugger Robot
9d6db99759 Merge "Allow filtering multiple properties in the transation log" 2021-10-25 09:25:46 +00:00
Nataniel Borges
1bbf014566 Allow filtering multiple properties in the transation log
Currently only one property can be searched at a time

Test: build winscope, record a transaction log and select fields to
filter
Bug: 159619726

Change-Id: I9712ca9a9ddc11e20d44e7c5c671803de386f368
2021-10-19 13:19:49 +00:00
Nataniel Borges
bfefca1c6d Case insensitive filter on winscope
Property and element search should be case insensitive

Test: build winscope, open a trace, filter layer or property by name
Bug: 203240981
Change-Id: I91575d550b3812b6a893136e965b0f1672389ab7
2021-10-19 12:45:14 +00:00
Nataniel Borges
82ac2cd45c Merge "Fix parsing of WM trace in critical mode" 2021-10-19 10:01:46 +00:00
Treehugger Robot
5d3cfd1694 Merge "Add Android.bp-based definitions for host sdk-repos" am: 036ddeba4c am: ea1db82614 am: 50fd203cf7 am: 2bd9535f87 am: 68e3c834bc
Original change: https://android-review.googlesource.com/c/platform/development/+/1827791

Change-Id: Iea75eade9da38a59af4e1efffb50b29e247add5c
2021-10-15 20:45:49 +00:00
Treehugger Robot
68e3c834bc Merge "Add Android.bp-based definitions for host sdk-repos" am: 036ddeba4c am: ea1db82614 am: 50fd203cf7 am: 2bd9535f87
Original change: https://android-review.googlesource.com/c/platform/development/+/1827791

Change-Id: I57fd2d9b5717fbb0315e53f3a940307a5f5ea3bd
2021-10-15 20:26:46 +00:00
Priyanka
2b5b9d7919 Edit SF and WM config from winscope. am: 5284e5a483
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/16047809

Change-Id: I2b50e786984ca93f5d5803522f9bf49b41caf30a
2021-10-13 16:46:53 +00:00
Priyanka
5284e5a483 Edit SF and WM config from winscope.
Can now set the buffer sizes for these two traces, as well as set
tracing level and type for WM. Tested for multiple combinations of
config settings, as well as if settings are left as
placeholders/selected as the name of the config.

Bug: b/200159899

Test: Run a SF/WM trace with arbitrary config settings and check that all loads as normal.

Merged-In: I50ccc271bd2f90dba1d22c3e8c568490c4bf831f
Change-Id: I50ccc271bd2f90dba1d22c3e8c568490c4bf831f
(cherry picked from commit 9d3f674027)
2021-10-13 15:20:22 +00:00
Nataniel Borges
f707c8083a Add analytics for trace and properties
Add analytics in winscope to know which trace types are being used, and which properties/element types are being expanded, to obtain data about their relevance

Test: yarn run build and test winscope
Change-Id: Icc7b0558c44e7bac8dcd9b140321a5c5b2bee403
2021-10-13 08:54:17 +00:00
Dan Willemsen
17df46e334 Add Android.bp-based definitions for host sdk-repos
So that these can be built independently from the large sdk zip. The old
Make-based implementation created this as part of the large sdk zip,
then extracted it from that zip file.

This topic only adds the new definitions under a different filename,
full replacement will come in a follow-on CL.

Once we fully transitions to this mechanism, we'll be able to turn down
most modules on Macs, only building these and their dependencies.

Bug: 187222815
Change-Id: If6be8dd573a323ef8b343bc86116ffa3d43922a5
2021-10-12 20:45:15 -07:00
Nataniel Borges
757ca2aa0d Fix parsing of WM trace in critical mode
When tracing WM in critical mode, the children object is not always
assigned and this previously crashed the WM trace parsing in winscope.

Fix the WM trace parsing by assuming all null children as empty arrays

Test: run winscope, collect critical trace, open critical trace in
winscope

Change-Id: Ib98c820969df56eee822fedc66897deb600857e7
2021-10-11 19:30:06 +02:00
Ryo Okuda
4fc1cba254 Merge "Create and show Chrome Wayland logs for Winscope" 2021-10-11 08:02:02 +00:00
rokuda
0bc49f3628 Create and show Chrome Wayland logs for Winscope
This change is adding Chrome Wayland logs to Winscope. The logs are
created by Winscope and shown on it. Since Wayland logs have been
already compatible with Winscope, this change adds some configs to
existing ones. Also, "Wayland" option is only visible when we connect
ARC, so Android users don't need to pay attention to conflicts.

Bug: 201374806

Test: manual by follow steps
    1) Start tracing by choosing "Wayland" and clicking "START TRACE" on Winscope.
    2) End tracing by clicking "END TRACE".
    3) See if the insets logs are available.
    4) Check if "Wayland" option is only visible when we connect ARC.

Change-Id: Ibfb5564a32c75929b449915a75db23ae3cd6447e
2021-10-11 13:38:49 +09:00
Nataniel Borges
aee363cc9b [DO NOT MERGE] Sync flicker from master to sc-v2 am: 3907154c2c
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/15886687

Change-Id: If0d85a7bae4dfb07c87b1f69a2606a22e7c26966
2021-10-08 09:04:15 +00:00
Ioana Moraru
b67161164a Display assertion name for errors in Winscope
Bug: 201523242
Test: upload an error trace and check the errors tab for the assertion
name

Change-Id: Ie76a868cb51fdc41093ec6c0abd364efd1045f61
2021-09-30 20:11:10 +00:00
Ioana Moraru
67b70b244f Fix Winscope compiling warnings
Test: compile Winscope and see there are no warnings
Change-Id: Iae7d2be4512df0295ce7e94ccfe364a3d741e685
2021-09-27 18:45:09 +00:00
TreeHugger Robot
399ccc8f9b Merge "Update PipClose to PipExpand." 2021-09-24 20:06:17 +00:00