Commit Graph

3926 Commits

Author SHA1 Message Date
Hui Ling Shi
595c67d790 [11] Change matching WM/SF entry to IME entry algo
Due to there being some slightly different timestamps between WM/SF
trace and IME trace, we want to allow some "fault tolerance" -- even
if a WM/SF entry comes after IME entry in time, it may still be the
corresponding entry if it's within a manually-defined "fault tolerance"
time.

For now, fault tolerance is defined to be 200ms. So if a WM/SF entry is
within IME entry +- 200ms, it may be considered a matching /
corresponding entry. Within this range, we will always try to pick a
WM/SF entry that comes before the IME entry. If there is no such WM/SF
entry, then we will pick one that comes after.

Bug: 236226833
Test: manual on local build of Winscope
Change-Id: I0782ec520284517bf964eeffd552e6175758c9f1
2022-08-01 08:46:43 +00:00
Hui Ling Shi
948c897065 [10] Refine WM & SF Properties IME subpanel
Make the following headers clickable; upon clicking, will show proto
details in the 'Properties' sub-panel on the right:
- WMState
- Ime Container
- Input Method Surface
- IME Insets Source Provider

Add the following properties:
- Focused window's color / rgba information -- focused window title
  extracted from WM trace, the corresponding surface's rgba extracted
  from SF trace
- InputMethod Window's visibility
- InputMethod Surface's visibility
- InputMethod Surface's rect & screenBounds

Remove the following properties:
- ImeContainer's rect & screenBounds

Rename the following properties:
- Frame (under 'Focus' heading) --> Input Control Target Frame

Screenshots: in buganizer ticket
Bug: 236226833
Test: manual on local build of winscope

Change-Id: I2a2747b57639f40c8f6bf71d5cb49268e4ee5044
2022-08-01 08:45:24 +00:00
Hui Ling Shi
cb0d23d9dd [9] Fix null targets in IME's 'WM & SF Properties'
Fix incorrect names of properties being extracted from WM Trace:
- 'Input Method Control Target' has been replaced with 'IME Control
Target', 'Input Method Input Target' with 'IME Input Target', and 'Input
Method Target' with 'IME Layering Target'.

Bug: 239145867
Test: manual on local build of winscope
Change-Id: If067cf73de32d4374b33d1f07f179b63c9fb0c27
2022-08-01 08:34:36 +00:00
Priyanka Patel
c40abfeb90 Add component tests and an upload card.
Adding component spec tests for all new components involved in trace
collection. This includes a new card for this CL, UploadTracesComponent,
to make testing more methodical.

Test: npm run test:component
Bug: b/238981126

Change-Id: I46d1b24fed84ce35432dad36fd5ac24d35cd0542
2022-07-29 11:36:25 +00:00
Priyanka Patel
64b08efa13 Adding ability to run and end traces via proxy.
Finishing proxy migration by creating functionality to run and end
traces and dumps after selecting trace config.

Test: Connect a device via remote device proxy and follow the proxy
workflow for a trace or dump. Should see a placeholder message saying data loaded (trace
views not yet created).

Bug: b/238113543
Change-Id: Ic7e0948341511f6ec0bf1021d2ffbb7b198c9410
2022-07-29 10:52:13 +00:00
Priyanka Patel
b6ee5d4794 Refactor code to use common connection.
None of the components should directly interact with the proxy because
non-android development workflow (using web adb) will also be possible
in the future. Instead the ui components interact with a common
connection interface which handles the proxy or web adb respectively.

Test: check that proxy workflow still works as expected.

Bug: b/234103636
Change-Id: I0e7bbaf4b5f342ca99dd67f890c135dbf3ef61ec
2022-07-29 10:50:31 +00:00
Priyanka Patel
88ea98f6ba Migration of proxy.
Migrating the proxy to the new trace collection UI. Should be able to
enter the proxy token, select your connected device and then make
changes to trace configrurations.

Test: try running the proxy and test that functionality is same as old
winscope.

Bug: b/238113543
Change-Id: I195f65df5d09e22db54cb9f5a7ba0396948f43d3
2022-07-29 10:50:12 +00:00
Priyanka Patel
b91e72bf40 trace collection UI
Created new UI components for trace collection. Since the proxy is not
yet migrated, click through the buttons to automatically cycle through
the components.

Bug: b/238981126

Test: npm run start
Click Web ADB tab to see basic component. Click ADB proxy tab to see
proxy component. Click Retry to get to authorisation options. Click
Connect to get to trace configuration component.

Change-Id: I1e7a9895ece06856c095d8c85c28d22bbfa94b31
2022-07-29 10:49:44 +00:00
Hui Ling Shi
febda81348 Merge "Downgrade vue-material version" 2022-07-27 06:04:05 +00:00
Kean Mariotti
6751fa5bd3 fix flickerlib facade
Remove code related to error/tag, which was removed from the Kotlin flickerlib as well

Test: npm run build:all && npm run test:all
Change-Id: Iaba34b458dd08aaae5ad18968a11ca8ab2d1e33a
2022-07-26 15:22:55 +00:00
Hui Ling Shi
8130d2c9e8 Downgrade vue-material version
Fix vue-material errors that show up when using MdSelect (which
we use for <Overlay />). These errors are a known bug in the
vue-material codebase
(https://github.com/vuematerial/vue-material/issues/2285) but no
patch is out for it yet. Hence, downgrade vue-material to the
latest version that does not have these errors.

Test: manual with local build of Winscope
Bug: 238262637
Change-Id: Icffead3cbf1fa1f2a6e4ec83564078f396e660cf
2022-07-25 07:49:36 +00:00
Treehugger Robot
a2b818c331 Merge "Exclude list may have comment" am: 71caa549f3 am: eeba035377 am: daa7ed2846 am: b06917a133 am: 8ecfab5be1
Original change: https://android-review.googlesource.com/c/platform/development/+/2158136

Change-Id: Idd73fbd17ac826dfaec421857a303730b9c45628
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 08:30:22 +00:00
Treehugger Robot
eeba035377 Merge "Exclude list may have comment" am: 71caa549f3
Original change: https://android-review.googlesource.com/c/platform/development/+/2158136

Change-Id: Ifc39a4719c6c1ea0c5589ec46ae7babf1479f98f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 07:01:48 +00:00
Treehugger Robot
71caa549f3 Merge "Exclude list may have comment" 2022-07-19 06:44:43 +00:00
Justin Yun
b2143bf4dc Exclude list may have comment
With this change the exclude list file may have comments that start
with '#'

Test: Run collect_ninja_inputs.py with excluded file list that has
      '#' comments
Change-Id: Ic2e3da8a34144426e00ebd45ee09ff9cb3b339bd
2022-07-19 14:31:44 +09:00
Treehugger Robot
73d2a0cd6c Merge "repo_pull: Attempt to fetch via ssh first" am: 4a2aacdeed am: cf1bb77660 am: 0fb346cb84 am: 38d0ea7201 am: bdb3a8c0c4
Original change: https://android-review.googlesource.com/c/platform/development/+/2128416

Change-Id: Ica21b170cc665429373cc91ee682fc6a341bb62d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 11:39:46 +00:00
Treehugger Robot
cf1bb77660 Merge "repo_pull: Attempt to fetch via ssh first" am: 4a2aacdeed
Original change: https://android-review.googlesource.com/c/platform/development/+/2128416

Change-Id: I258f742d4f9cbc209488e343378c74fbb7555fd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 10:07:40 +00:00
Treehugger Robot
4a2aacdeed Merge "repo_pull: Attempt to fetch via ssh first" 2022-07-18 09:48:02 +00:00
Treehugger Robot
cd48267edd Merge "[LSC] Add LOCAL_LICENSE_KINDS to development" am: 4b914d2e0d am: 0709cb8a7b am: 4d0d1a8058 am: 0cdcbb640f am: 54be2a1032
Original change: https://android-review.googlesource.com/c/platform/development/+/2154415

Change-Id: Ia47f2eb32f048852b39f59f557e3f88010c3ad31
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 02:32:43 +00:00
Treehugger Robot
0709cb8a7b Merge "[LSC] Add LOCAL_LICENSE_KINDS to development" am: 4b914d2e0d
Original change: https://android-review.googlesource.com/c/platform/development/+/2154415

Change-Id: I833e6c5ad0cce25e0a4f0f9fbe5aae2524ec5f69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 01:01:44 +00:00
Bob Badour
49a787d725 [LSC] Add LOCAL_LICENSE_KINDS to development
Added SPDX-license-identifier-Apache-2.0 to:
  apps/OBJViewer/Android.bp
  samples/HeavyWeight/Android.bp
  samples/MySampleRss/Android.bp
  tools/ninja_dependency_analysis/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: Ic4627f424a3ecfbe65145268242a37f373c05a01
2022-07-14 11:08:07 -07:00
Kean Mariotti
a50b7f37cd Merge changes I8c59c8a0,Id6a20576
* changes:
  add eslint to keep code consistent
  add Presenter + UI data example
2022-07-14 17:38:11 +00:00
Hui Ling Shi
8310ad724d Merge "[8] Add screenshot button to capture each panel" 2022-07-14 13:12:43 +00:00
Kean Mariotti
a601688303 add eslint to keep code consistent
Bug: 236369779
Test: npm run eslint
Change-Id: I8c59c8a0ff6b63920ad0298c9625bee9709f2bb6
2022-07-14 08:29:44 +00:00
Kean Mariotti
3c32ba53f0 add Presenter + UI data example
Bug: 236369779
Test: cd development/tools/winscope-ng && npm run build:all && npm run test:all
Change-Id: Id6a20576cdb87c54e503e46b2f40562900295bc5
2022-07-14 08:27:24 +00:00
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
Luca Stefani
396466344b repo_pull: Attempt to fetch via ssh first
This is usually preferred if supported by the server

Change-Id: Ie15df0231a679d55ba1adfd7e7d86f4999828e27
2022-07-12 13:02:59 +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
Hui Ling Shi
ea043e692e [8] Add screenshot button to capture each panel
Screenshot button is added as a camera icon at the top right corner
of each panel (e.g. WindowManagerTrace, SurfaceFlingerDump).
Upon clicking this button, an image is downloaded to the user's
computer (Downloads folder), showing the whole panel - Hierarchy,
Properties etc.

Added dependency: html2canvas library

Screenshot: https://screenshot.googleplex.com/5rRzqKcEVsJRW2K.png

Bug: 236226833
Test: manual on local build of Winscope
Change-Id: Idd476017a780288c0e5ae09ce62334333fb9a652
2022-07-07 02:48:57 +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