Commit Graph

3899 Commits

Author SHA1 Message Date
Kean Mariotti
2e464d915b fix global styles
Bug: 236369779
Test: cd development/tools/winscope-ng && npm run build:all && npm run test:all
Change-Id: I551889207862cfd698ccf634275c5c84d1b976d1
2022-07-12 18:13:04 +00:00
Kean Mariotti
ebcaef29b7 Merge "Parsers receive Blob instead of Uint8Array" 2022-07-11 06:48:01 +00:00
Kean Mariotti
f20532c080 Parsers receive Blob instead of Uint8Array
Now Parsers rely on the Blob interface/abstraction, instead of the concrete Uint8Array.
Thus, in the future we'll be able to implement incremental trace parsing (e.g. stream parsing)
without breaking client code (e.g. ABT).

Minor: specify timeout in end-to-end tests

Test: npm run test:all
Change-Id: I9098ee3beba231f4bb4b59b24cee60e5a1e1122e
2022-07-08 13:41:05 +00:00
Hui Ling Shi
85da20b4d8 Merge "[7] Refine UI for IME panels, PropertiesTableView" 2022-07-08 09:20:08 +00:00
Treehugger Robot
199b636d65 Merge "Ninja dependency analysis tool" am: 58776972a8 am: af31f40f98 am: ec6ac730d5 am: 4c03e446d1 am: a01a5a42c1
Original change: https://android-review.googlesource.com/c/platform/development/+/2146699

Change-Id: I3a40a88b3186bac6a2af8653f146c1c3a59a42f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-08 07:49:59 +00:00
Treehugger Robot
af31f40f98 Merge "Ninja dependency analysis tool" am: 58776972a8
Original change: https://android-review.googlesource.com/c/platform/development/+/2146699

Change-Id: Iadd71e7ed10730884ee410729bc07c2b3c6359dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-08 06:21:40 +00:00
Jeongik Cha
1408cdc5e6 Ninja dependency analysis tool
The tool collects every input file for target except exempted_files.
And also, it counts input files per each project.

Bug: 238156000
Test: collect_ninja_inputs \
  -n prebuilts/build-tools/linux-x86/bin/ninja \
  -f out/combined-aosp_cf_x86_64_phone.ninja \
  -t vendorimage \
  -e exempted_files \
  -r .repo/project.list

Change-Id: I19b8b3462a1f1766babe4d437fe71bd7eb4bc7d2
2022-07-08 01:28:37 +00:00
Kean Mariotti
bc9ec13037 add Parser::getTraceEntries() for protologs
Test: npm run test:unit
Bug: 238091229
Change-Id: Iba828868625b320c9fc03ca9d95f44dc76315e2e
2022-07-07 05:56:10 +00:00
Kean Mariotti
4d70c4b4a4 More trace parsers
- SurfaceFlinger dump
- WindowManager dump
- screen recording
- Minor renaming to keep code semantic consistent also with ParserScreenRecording

Fixes: 238097667
Fixes: 238097628
Fixes: 238078364
Test: npm run build:unit && npm run test:unit
Change-Id: I01aa22c1bb030da21f6fb44eb1b159a4431191ce
2022-07-07 05:55:11 +00:00
Kean Mariotti
f339fe9f42 add e2e test infrastracture (protractor-based)
Test: npm run test:e2e
Change-Id: I5b9c227e4538bb64410b3bf2aa5543c91a23a0f2
2022-07-05 17:42:42 +00:00
Kean Mariotti
7f1e9e3c45 enable Angular production mode
Test: npm run build:prod
Change-Id: Iadfe6f81b0cfb611aa6b9266a08424927d82c5d1
2022-07-05 17:09:00 +00:00
Kean Mariotti
6cbe5e5e04 deploy Winscope as single html file
Test: npm run build:prod
Change-Id: I0766d9071566750dc9cdd4d9fb0c4c672b94e8e2
2022-07-05 17:05:18 +00:00
Hui Ling Shi
f11108ba95 [7] Refine UI for IME panels, PropertiesTableView
PropertiesTableView:
- Fix a PropertiesForTableView bug - did not account for null value
of IME 'Client' in the trace
- Remove ‘Key Properties’ table heading as it is obvious enough

TreeView:
- Wrap text properly in TreeView component (for node names)

IME Panels / WM&SF Properties sub-panel:
- Add table view for coordinates (for bounds, rects, frame etc.)
- Cut away the parent nodes above ‘ImePlaceholder’ or ‘Task’ node
for the SF subtree displayed in ImeTrace Clients & IMS panels
- Allow 2 SF subtrees, hypothetically: one for 'ImeContainer' and
one for 'IME-snapshot'
- Change its color when an InputMethod...Target is selected in
ImeTrace IMMS' WM&SF Properties sub-panel
- Show a message when there is no corresponding WM / SF entry
- Fix y-overflow / scrolling issues for the WM&SF Properties sub-panel
- Add SFLayer timestamp in WM&SF Properties sub-panel
- Change 'bounds' to 'screenBounds' attribute of ImeContainer

Screenshots: in buganizer ticket

Bug: 236226833
Test: manual on local build of winscope
Change-Id: I667bb97a580ba8dd2f17e86f956012b69b964767
2022-07-05 10:09:25 +00:00
Kean Mariotti
dc2d967182 Merge "winscope-ng initial commit" 2022-07-05 05:38:09 +00:00
Kean Mariotti
0610eb8c0d winscope-ng initial commit
- webpack-based dev environment
- unit tests (node-based)
- Angular component tests (karma-based)
- Protobuf parsers:
    - Accessibility
    - Input Method Clients
    - Input Method Manager Service
    - Input Method Service
    - ProtoLog
    - SurfaceFlinger
    - Transactions
    - WindowManager
- Kotlin -> JavaScript transpilation of flickerlib

Bug: 236369779
Bug: 236369812
Test: npm run test:unit && npm run test:component
Change-Id: Ib4ffc34634b088a39e8fbf3c400be56a1015e9a5
2022-07-04 13:43:45 +00:00
Hui Ling Shi
e0e201d725 [6] Fix infinite loop for IME processing
Previously, some Winscope traces and ADB captures will go into an
infinite loop after IME processing was introduced.
The issue was a loop in filtering the SF Layer node that did not
account for multi-windowing mode or cases where the expected parent
could not be found. This commit fixes this issue.

Bug: 236679852
Test: manual with previously failing traces
Change-Id: I8d3fe42802efa195926b5be0d4242a0bb0696988
2022-07-01 07:47:53 +00:00
Hui Ling Shi
6fbc98df12 [5] Modify "kind" attribute of trace entries
- Add constants to flickerlib's common.js defining the "kind" of
WindowManager and SurfaceFlinger entries
- Modify flickerlib's WindowManagerState and LayerTraceEntry,
as well as ime_processing.js, to use these constants
- Modify the "kind" of IME entries directly in transform_ime.js.
In the future, these should also be constants defined in flickerlib

Bug: 236226833
Test: manual on local build

Change-Id: I310f301e82ae976a202ca1c8cc40c7b686a9723f
2022-07-01 07:47:52 +00:00
Hui Ling Shi
9ba943f1b0 [4] Refine WM&SF Properties sub-panel
- Extract specific WM / SF properties and display only in relevant IME
panel(s) (Client / Service / ManagerService)
- Add clickable items in 'WM & SF Properties' sub-panel that shows full
tree in 'Properties' sub-panel

Screenshots:
- ManagerService: https://screenshot.googleplex.com/ZkoDs8SfxLtprH5.png
- Clients: https://screenshot.googleplex.com/7PT6GG8YRbNrDcC
- Service panel displays the same properties as Clients panel

Bug: 236226833
Test: manual on local build of winscope

Change-Id: Ie96e17cf32311e56af66f8cee66e4f92b9751b5b
2022-07-01 07:47:52 +00:00
Hui Ling Shi
2a80be87df [3] Add WM&SF Properties sub-panel in IME panels
If there are WM or SF trace entries that correspond with IME trace
entries (i.e. the WM/SF entry comes before the IME entry in time),
the 'WM & SF Properties' sub-panel will be displayed below the
'Hierarchy' sub-panel in the IME trace panel.

- This sub-panel currently displays properties extracted from
WM entry, not yet SF entry.
- Code is added in 'ime_processing.js' to extract WM properties,
and 'freeze: false' is set in 'transform_ime.js' so that IME entry
objects are not frozen and can be modified during processing
- SF entry, displayed as a tree in the Hierarchy sub-panel, is pruned
to only ImeContainer or IME-snapshot node and its sibling nodes.

Note: there is a bug in this CL (b/236679852) that is fixed later
in CL[6]. Also, null values are not handled well in this CL, and
will be fixed later in CL[4].

Screenshot: https://screenshot.googleplex.com/6RXiRyX47qLAL9i.png

Bug: 236226833
Test: manual on local winscope

Change-Id: I07be7f492a6275c3fdafd6d1f523fdf4d552d16b
2022-07-01 07:47:50 +00:00
Hui Ling Shi
6744711cba [2] Add IME processing for ADB-captured traces
IME processing refers to adding WM and SF properties into corresponding
IME entries. Shared functions for this are in 'ime_processing.js',
called when IME and WM / SF traces are input via both ADB or file upload.

- WM and SF entries are displayed as nodes in the 'Hierarchy' sub-panel
of IME panels.
- The SF entry is pruned to only the branch containing 'ImeContainer'
node.
- The WM entry is not yet filtered.

Screenshots:
- Before: https://screenshot.googleplex.com/BYU279cqkTQ5iBP.png
- After: https://screenshot.googleplex.com/3Uhj3XBcpp9Cc6u.png
- Note: screenshots only show 1 IME panel; same changes are made to
all 3 IME panels

Bug: 236226833
Test: manual via local Winscope

CL[1]: If64aff9e899363188010633758e36be474666984

Change-Id: I31d96a43769d64d1e0151b8d620d9d5beaaf7e79
2022-06-23 08:47:01 +00:00
Hui Ling Shi
47fd714900 Merge "[1] Introduce beta feature flag for new Ime panels" 2022-06-22 05:40:56 +00:00
Hui Ling Shi
e32cd27b76 [1] Introduce beta feature flag for new Ime panels
Add a new toolbar at the top of the front page of Winscope app.
This toolbar will show a list of beta features and checkboxes for
users to choose whether to use the beta feature.

For now, the only beta feature is the new / improved UI version
of the ImeTrace panels (to be implemented in the next few CLs).

Bug: 236226833
Test: manual (on local winscope build)

Change-Id: If64aff9e899363188010633758e36be474666984
2022-06-22 04:30:49 +00:00
Hui Ling Shi
c942fad199 Limit scope of PropertiesTableView styling
Previously in [1], the style in PropertiesTableView component is applied
directly to common Vue components like <md-table-cell />. This may
create confusion in the future if <md-table-cell /> is used in other
components, as the style configuration of <md-table-cell /> would not
be the default Vue one, and would instead follow PropertiesTableView's.
This commit fixes this issue by limiting the scope of the CSS styling
in PropertiesTableView.vue.

CL[1]: I39fe382ffb50d71e67cace912452a33ca49de3f9

Test: manual on local build of Winscope
Bug: 235313782
Change-Id: I44d9afb8f49cc21748807c0b8b7e912db6f37a52
2022-06-20 04:49:55 +00:00
Hui Ling Shi
ce34807df9 Add 'Key Properties' table in IME Hierarchy panels
Remove the properties written in the names of the following nodes and
instead display them in a new 'Key Properties' table (at the top of
the Hierarchy sub-panel).
- 'Client' node in ImeTrace Clients panel
- 'InputMethodService' node in InputMethodService panel
- 'InputMethodManagerService' node in InputMethodManagerService panel

Screenshots:
- Before: screenshot.googleplex.com/4JbVT42WrcTN3HK.png
- After: screenshot.googleplex.com/7AfwzZEjMN2BQuB.png

Bug: 235313782
Test: manual (on local build of Winscope)

Change-Id: I39fe382ffb50d71e67cace912452a33ca49de3f9
2022-06-16 09:48:53 +00:00
Pablo Gamito
7a1b062db6 Merge "Make it harder to accidentally zoom into the traces" 2022-05-30 09:55:00 +00:00
Treehugger Robot
79b73f460b Merge "Fix adb proxy get device id on windows" am: 120f46ef53 am: 5d4f0e7546 am: da6908fec7 am: b8ee00638c am: 846f9658e8
Original change: https://android-review.googlesource.com/c/platform/development/+/2098153

Change-Id: Ie0b8e2ca8add2c727b8cce8739a866a289cbeff2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 16:17:48 +00:00
Treehugger Robot
da6908fec7 Merge "Fix adb proxy get device id on windows" am: 120f46ef53 am: 5d4f0e7546
Original change: https://android-review.googlesource.com/c/platform/development/+/2098153

Change-Id: I519a1541f823739faefa347a97a05525557dd53f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 15:16:00 +00:00
Kean Mariotti
111237a5a6 Cleanup test code
Replace multiple ad-hoc Node classes with single builder class

Test: yarn run test
Change-Id: Iebe76c59fbc3bcccdf89885f7d4cdbaa0d6a0576
2022-05-16 15:26:58 +00:00
Kean Mariotti
f0273cd5b4 Fix Chips missing on SF/WM traces when "Show Diff" toggled
Test: yarn run test
Fixes: 231924100
Change-Id: I1923b01e0841282fb27757b5c48ec5b3c76cb24a
2022-05-13 15:09:51 +00:00
zengshuchuan
a7526ac28b Fix adb proxy get device id on windows
Window adb device contains a '\r' character,
translate string to integer comparing.

Bug: 232488036
Test: 1. Excute python.exe winscope_proxy.py on Window Powershell.
2. Launch winscope index.html and set the Winscope token.
3. Tablet connect adb and winscope select the device.
4. Tap the 'DUMP STATE' button.

Change-Id: I8c261da523763982ea4a4bfae6883694b221883c
2022-05-13 16:58:41 +08:00
Nataniel Borges
50775a7444 [DO NOT MERGE] Update winscope proxy on R
Backport uspport for device paths with :

Fixes: 196260922
Test: open winscope and collect a trace
Change-Id: Ib2d8088e3a3452c1fea1cccb599dbd9d2ce642d4
2022-04-21 14:32:26 +00:00
TreeHugger Robot
f0a118c575 Merge "Support multiple devices in winscope proxy" into tm-dev am: 9ac33a4a0e am: 24739793a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/17760468

Change-Id: If541375b1325b47fad4d7398b1065b21a378dfaf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 11:37:04 +00:00
Nataniel Borges
241e9e5c08 Support multiple devices in winscope proxy
Now, the proxy supports multiple phones connected.

For use with Wayland, only 1 device can be connected

Fixes: 219802355
Test: Collect trace with multiple devices connected
Change-Id: I8f43f2411af10292cf78e2c022a409497cbb69b5
2022-04-14 22:20:34 +02:00
TreeHugger Robot
9e546e39ed Merge "Fix Lazy layers trace parsing in winscope" into tm-dev am: ac1d14473c
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/17237203

Change-Id: Id055735ca98f484f719579dc92e457f7b7a771fa
2022-03-17 15:24:23 +00:00
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
TreeHugger Robot
0ea518221c Merge changes from topic "presubmit-am-27c23569716e478691fb069b3ff6e988" into tm-dev am: e78dd74bd6
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/17135629

Change-Id: Ie005f738fa9ed364cd66b1766c9ba4539a0ae253
2022-03-10 21:05:16 +00: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
Vishnu Nair
f89a0fbaa9 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
2022-02-22 22:04:11 -08:00
Vishnu Nair
e9289bf5a6 Winscope: group surfaceflinger trace properties 1/2
Make it easier to understand surface flinger traces by:
- grouping similar properties
- adding tooltips demystifying some of the derived properties
- cleaning up property names

Test: go/winscope load traces
Bug: 200284593
Change-Id: Ia8ea55b4b4c2bef1fc38228d3e9738231be403bb
2022-02-17 11:28:08 -08:00
Xin Li
c081864bf3 Merge sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I9b94d270148d8ce5fa97f88f460d8c03eac3873c
Change-Id: I34852886e6e98d2964318d6fcc6ebd7292e47544
2022-02-11 06:56:24 +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