Commit Graph

377 Commits

Author SHA1 Message Date
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
3907154c2c [DO NOT MERGE] Sync flicker from master to sc-v2
Flicker on master diverged form sc-v2, to make it easier to debug
flicker issues on sc-v2, push the current version of flicker into sc-v2

Test: atest FlickerTests WMShellFlickerTests
Bug: 183993924
Change-Id: I0bd06578e7c93271d4f84361c15818385a8a4fdb
2021-09-22 09:21:34 +00:00
Nataniel Borges
325b0476f5 [DO NOT MERGE] Sync flicker from master to sc-v2
Flicker on master diverged form sc-v2, to make it easier to debug
flicker issues on sc-v2, push the current version of flicker into sc-v2

Test: atest FlickerTests WMShellFlickerTests
Bug: 188792659
Change-Id: Iaacfaa75102f93351a6ccd0252ecd739784f94ff
2021-08-31 15:08:53 +00:00
Nataniel Borges
f230a13f30 [DO NOT MERGE] Full - Compatibilize winscope with master
Bug: 194813677
Test: none
Change-Id: Ie55429dcb746f597f80dfdaa68cbef19f5820005
2021-07-28 07:30:10 +00:00
Nataniel Borges
b8e901f896 Backwards compat for TaskFragment + overlap fix
Add backwards compatibility for traces that didn't use the TaskFragment
on winscope. Moreover, fix the overlap calculation (using wrong object
type)

Bug: 185516271
Test: yarn run dev and open older SF and WM traces
Change-Id: I8d6c98a53cf4c5062dd7a366ef467755907dc0ed
(cherry picked from commit 752cec2b96)
2021-07-06 09:50:56 +00:00
Charles Chen
92d1bda2a2 Update Winscope for TaskFragment
1. Add TaskFragment.ts
2. rename ActivityTask.ts to Task.ts

Bug: 190684677
Test: manual - run "yarn run dev" in winscope directory
               click "dumnp state"
Change-Id: Ie7339af9e4906e38b73bcd01dd9fbf1d00d25a3b
2021-06-17 22:01:14 +08:00
Nataniel Borges
c84155243a 5/ Show Flicker properties on Winscope (WM)
- Use flicker object on the property tree
- Keep `proto` entry on the property tree with the original proto file
- Use `prettyPrint` method on flicker to format output for winscope

Bug: 185516271
Test: build winscope and open WM traces
Change-Id: I1c9f1a106b82f487b78d1b386cc091d21715e04d
2021-04-29 21:11:45 +02:00
Nataniel Borges
449ee7d803 4/ Sort property values on Winscope
Present the values of WM and SF traces alphabetically

Bug: 185516271
Test: build winscope and open WM/SF traces, check the property list
Change-Id: I6cc5553ae6e987d52f812c030b0e4706ab58606b
2021-04-29 21:10:41 +02:00
Nataniel Borges
06a596be4d 3/ Simplify WM parsing on Winscope
- Use flicker class type as object type
- Use name from flicker
- Use stableID from flicker
- Refactor element visibility
- Rename `childrenWindows` to children to avoid creating a new property

Bug: 185516271
Test: build winscope and open WM traces
Change-Id: I582c0fe4ac48f8a503d1dccfbce437d489a50ca7
2021-04-29 21:10:23 +02:00
TreeHugger Robot
866c1f5d04 Merge "Consider windows with alpha=0 as invisible" into sc-dev 2021-04-16 10:22:36 +00:00
Nataniel Borges
d945fbd381 Update winscope dependencies
Current version of winscope had several dependencies with deprecation
and security warnings. To avoid issues, update to the latest compatible
versions according to `package.json` configuration using `yarn upgrade`

Bug: 162925924
Test: compile and run winscope (yarn run dev)
Change-Id: I29b387e0620e0460d9ea51dbca4039bbeb4deb39
2021-04-14 15:03:47 +02:00
Nataniel Borges
ccd908b3f8 Consider windows with alpha=0 as invisible
Previously Winscope considered only the `isVisible` property to
determine if the window was visible or not. This failed in cases such as
`com.google.android.googlequicksearchbox/android.app.ContextImpl` when
launching apps, where `isVisible=true` and `alpha=0`

Bug: 181630910
Bug: 182720234
Test: atest FlickerTests
Change-Id: I73de39557f0a9cebaad66d169f81794779793f64
2021-04-14 14:59:53 +02:00
Nataniel Borges
24e39c5c4c Fix missing function MapNotNull
MapNotNull is not a standard TS/JS function

Test: compile winscope and open any file
Bug: 167522376
Change-Id: I796d96eb963627bd3a872dea9dea51c7eaa97e8c
2021-02-24 19:53:31 +01:00
Vishnu Nair
082f6a661f Add visible region to list of visibility reasons
Test: open trace from bug
Fixes: 157252333
Change-Id: Ifebac00a112798bbd03cf74458a1ffc7682890f6
2021-02-16 16:19:09 -08:00
Nataniel Borges
dc836bc679 Make winscope compatible with flickerlib constructors
Recently the constructors of the flickerlib objects were
updated to reduce memory.

This CL updates winscope parser objects and fix visualization
so that it is compatible with those changes

Bug: 178572522
Test: `yarn run dev` and open a window manager trace
Change-Id: Ic331fe90d17e5c30c9062f119e26e824dbe1e5a7
2021-02-05 13:59:03 +01:00
Nataniel Borges
0b1e4bbf9f Merge "Consider rounded corners in occluded by (winscope)" 2021-01-06 09:38:14 +00:00
Nataniel Borges
5f2176643f Add windowContainer to winscope
This information was removed in a previous code refactor but is still
necessary

Bug: 162925924
Test: Compile winscope. Open a WM trace. Check if the window container
property exists

Change-Id: Ia93b927945f6aafa428fe5ebc3c3aace8223e2a7
2021-01-06 09:56:52 +01:00
Nataniel Borges
8485125094 Consider rounded corners in occluded by (winscope)
The visible region calculation in the surface flinger doesn't consider that a layer with rounded corners can fully occlude another. Use the same behavior in flicker and winscope.

Bug: 174541970
Test: atest FlickerTests
Change-Id: Ie8e871a94b4413d2f02624c5738841d5d861bbbe
2021-01-05 17:18:36 +01:00
Vishnu Nair
d52381da39 Fix sf trace flag propagation in winscope
Fixes a couple of issues:
- if no flags are set, the configuration will not be send to the proxy.
Fix this by always sending the requested config
- make winscope tracing sync by default as a temp workaround for the
async tracing crashes

Bug: none
Test: toggle composition trace flags from winscope and check trace
Change-Id: I724dcc19309a616d3eb096d966dd40bf00c5d8ed
2020-12-17 23:05:17 +00:00
TreeHugger Robot
6a7886ae39 Merge "Revert "Winscope: add more sf trace flags and visibility reasons"" 2020-12-07 19:14:56 +00:00
Vishnu Nair
8e5aa26704 Revert "Winscope: add more sf trace flags and visibility reasons"
This reverts commit 78574c94dc.

Reason for revert: breaks winscope

Change-Id: I5a2200ce49277de67213c7302fed7f5d3d9a7ac1
Fixes: 174993871
2020-12-07 17:25:09 +00:00
TreeHugger Robot
858dbc28bf Merge "winscope: handle missing child layers gracefully" 2020-12-04 18:51:49 +00:00
Vishnu Nair
78574c94dc Winscope: add more sf trace flags and visibility reasons
- Detect if a layer is not drawn if its corner radius crop is incorrectly set
- Add more sf trace flags with usage info

Test: manual testing
Change-Id: I4dbf93c1cc1a51bd713414451832f4f873054afa
2020-12-03 18:40:38 -08:00
Nataniel Borges
c4d960d343 Allow null stableBounds on DisplayContent
Sometimes this information is null on the proto, this would crash
Winscope. Instead use an empty Rect when the information is unavailable

Bug: 167521440
Test: open a WM trace on Winscope
Change-Id: Ia6ceddfbbf8e083d02932925536ac64edafa6a2a
2020-12-03 19:03:18 +01:00
Nataniel Borges
d4a36f8cdc Merge changes from topic "flicker-cts"
* changes:
  Determine if the WM entry is complete or not
  Make winscope compatible with flicker/CTS infra
2020-12-03 08:59:15 +00:00
Ioana Stefan
0c2f1368ca Merge "Change parse logic for complex flags" 2020-12-01 13:12:38 +00:00
Nataniel Borges
9534747390 Determine if the WM entry is complete or not
Use the same logic from CTS tests

Read the information from flickerlib and display in winscope

Test: yarn run dev and open a few WM traces
Bug: 167521440
Change-Id: I96cb956968066afaabb3acf53615db53bdfabe37
2020-12-01 12:25:40 +01:00
Nataniel Borges
5e4ca356ae Make winscope compatible with flicker/CTS infra
Flickerlib is migrating to the same structure as the CTS tests. This cl
makes winscope compatible with this changes. It now parses traces with
the new information and add a "flickerObj" entry to each node with the
calculated vlaues from flickerlib

Test: yarn run dev and open a few WM traces
Bug: 167521440
Bug: 170372278
Change-Id: I4a116ccabe392c75e5b5049808d4837f865cb2c7
2020-11-30 15:29:49 +01:00
Ioana Stefan
e30653b690 Update Winscope README
This change updates the Winscope README with the new way of generating
the IntDefs mapping and copying it to the right location.

Test: N/A
Change-Id: Ifec40c8f0c878df37142899bac87413b46bb9e40
2020-11-30 11:51:57 +00:00
Ioana Stefan
0a8e0fb003 Change parse logic for complex flags
This change modifies the order in which flags are considered for IntDef
matching in Winscope. The most inclusive flags will be considered and
displayed first. Because of this, their composing values will not be
displayed anymore if a more inclusive flag is found first.

Bug: 173682107
Test: do a WM trace through ADB Connect in Winscope and see Gravity
values

Change-Id: I4fbba4d9bd11ef6acfec50acc3147f5994e4bd1f
2020-11-30 09:48:59 +00:00
Vishnu Nair
e8ed906987 Merge "winscope: fix incorrect bounds offset" 2020-11-25 00:08:01 +00:00
Vishnu Nair
632c18f34d winscope: handle missing child layers gracefully
log a warning instead of failing to open the trace

Test: open traces in b/169708770
Change-Id: Iff327b2a6f41c231a379a698345e39b1d89e74e1
2020-11-24 13:07:49 -08:00
Vishnu Nair
75c0e70c00 winscope: fix incorrect bounds offset
Fixes incorrect visualization of sf layers if layer bounds are
not at 0,0. This can happen if the parent layer ends up cropping
the child layer.

Test: manual test with problematic winscope trace
Change-Id: I1e0c4ec0e632b015f6fae26ee20985cd6c56aa16
2020-11-23 12:49:25 -08:00
Ioana Stefan
e49c271314 Display only current InputConnection call data in Winscope
With this change Winscope will display only the current InputConnection
call information, compared to before, when all other methods were
displayed with null information.

This change affects both the client and service views.

Bug: 154348613
Test: upload a cleint or service trace in Winscope and visualise
inputConnectionCall information

Change-Id: I99e254715f7252e9349e27f56dec603d2e5f31bd
2020-11-20 17:33:44 +00:00
Ioana Stefan
d15dbbc63c Add more information on the Hierarchy side in Winscope
This change adds more contextual information on the Hierarchy side of
Winscope for IME traces. Some of the important attributes for
identification are added to the name of each entry.

Example views: https://screenshot.googleplex.com/8oPMKoGsu9nRcYG,
https://screenshot.googleplex.com/ANwZ3HshmTLteQb,
https://screenshot.googleplex.com/AaNYWJPUoVNGbM3

Bug: 154348613
Test: upload IME traces in Winscope or use ADB Connect
      check the 3 views
Change-Id: I1a4f887674ddab9cea20693a34b62af52a47a151
2020-11-20 11:38:26 +00:00
Ioana Stefan
0079eaa440 Fix ADB connect InputMethod naming
This changes fixes the InputMethodManagerSerice file naming for starting
tracing through ADB connect.

Bug: 154348613
Test: start Winscope and do an InputMethodManagerService trace through
      ADB connect
Change-Id: Ia627250f523922ef8f73bb277a95f44aacd94f0e
2020-11-17 17:47:28 +00:00
Ioana Stefan
38a47cfed7 Update clients view for IME tracing
This change updates the tarnsform operation of the clients view in
WInscope. This is done because of the new structure of dumped data on
the clients side: one trigger dumps a single client, instead of the
entire list of active clients.

Bug: 154348613
Test: flash a device
      start IME tracing by calling "adb shell ime tracing start"
      end IME tracing by calling "adb shell ime tracing stop"
      pull generated trace files and visualize in Winscope
      or start tracing directly through ADB Connect and visualize traces
Change-Id: I50c9a27a01a2f026acf4ee0f9dc394a6f74c06f2
2020-11-12 14:06:57 +00:00
Ioana Stefan
fdd20c9e95 Updated Winscope view for IME tracing InputMethodManagerService information
Updated the IME tracing view in Winscope for the new optimized proto
dump format. This change adds the IMMS view separately from the
previously added clients and IMS views.

Bug: 154348613
Test: build and run the code using "yarn run dev"
      build and flash the android code to a device
      start and stop IME trace from the command line and then upload the files into Winscope or
      start IME trace from the web interface, open an IME on the android device to generate logs, end trace from the web interface to see the logs
Change-Id: I0e3a2089c3d7b29c57477adc882047bb0829d2fd
2020-11-09 12:24:54 +00:00
Ioana Stefan
dedfadb349 Updated Winscope view for IME tracing InputMethodService information
Updated the IME tracing view in Winscope for the new optimized proto
dump format. This change adds the IMS view separately from the
previously added clients view.

Bug: 154348613
Test: build and run the code using "yarn run dev"
      build and flash the android code to a device
      start and stop IME trace from the command line and then upload the files into Winscope or
      start IME trace from the web interface, open an IME on the android device to generate logs, end trace from the web interface to see the logs
Change-Id: Ia1ae9dc55f20c776c6fccd3399a57e6747737a66
2020-11-09 12:24:36 +00:00
Ioana Stefan
724f11355e Updated Winscope view for IME tracing clients information
Updated the IME tracing view in Winscope for the new optimized proto
dump format. This change included only the clients view since only
this information is currently dumped.

Bug: 154348613
Test: build and run the code using "yarn run dev"
      build and flash the android code to a device
      start and stop IME trace from the command line and then upload the file into Winscope or
      start IME trace from the web interface, open an IME on the android device to generate logs, end trace from the web interface to see the logs
Change-Id: I3dc01d602147d41af3c5b99b848cb428e402c219
2020-11-09 12:24:21 +00:00
Ioana Stefan
caafebcfdc Add fallback mechanism for identifier of older window traces
Older WM traces might not have an identifier set for
WindowContainer since this was added in ag/11659380.

This change makes Winscope again backwards compatible with older
WM traces. If it exists, the identifier of a parent holds the
place of a missing WindowContainer identifier. It is possible
that both identifiers are null, in which case the title and the
hashCode of WindowContainer are set as empty strings.

Bug: 170372278
Test: build Winscope locally, upload a WM trace and visualise it
Change-Id: Ieb5adc1d6a94d9a9215304b92114b807f1d812b4
2020-10-29 15:03:12 +00:00
TreeHugger Robot
a5b6561f83 Merge "Fix z-ordering in winscope sf traces" 2020-10-21 17:26:12 +00:00
Vishnu Nair
3f1c28f9b8 Fix z-ordering in winscope sf traces
Fallout from previous refactors.

Test: Open sf trace in winscope. Confirm layers are displayed in correct z-order
Change-Id: I256d03fe4fdd475f0172c79b524bbe99f4c2dde4
2020-10-19 13:33:35 -07:00
Vishnu Nair
9a4753ac5f Winscope: fix layer traversal
Test: open sf trace of chrome in winscope
Change-Id: I4e0e9fad427e920021e00a2d6330027b43543502
2020-10-15 14:49:28 -07:00
Ioana Stefan
25b14c8e4f Merge "Include IME trace in Winscope" 2020-10-05 13:33:05 +00:00
Pablo Gamito
6285321a36 Merge "Update testing build configuration to be compatible with new changes" 2020-10-01 17:22:48 +00:00
Pablo Gamito
b6f0e66604 Address missing layers in layer traversal
Test: Make sure we can load traces where layers are missing
Change-Id: Iec96a3e6c10828af971cb12403aec38ba910cd9b
2020-10-01 16:42:22 +02:00
Pablo Gamito
47c13b2711 Make sure block calculation takes into account cropping
When zooming in the block size didn't adapt so we would see a large block instead of many small ones like we should be seeing

Test: Zoom in and make sure you see each individual entry and not all of them
Change-Id: I50d588cfe9e633d6aa0e771c6fbaefe4173ecce6
2020-10-01 16:42:22 +02:00
Pablo Gamito
9ff44e293e Update timeline position on transaction entry timestamp click
Test: Manual
Change-Id: I66a3f8b5a323c19f57881ba50e5222c793c804ff
2020-10-01 16:42:22 +02:00
Pablo Gamito
84c82dc691 Remove extra semi-column in tree view properties elements
Test: Visual
Change-Id: I62f3bca1241c4723d0d94c16e75056c62818d85d
2020-10-01 16:42:22 +02:00