Commit Graph

4244 Commits

Author SHA1 Message Date
Nataniel Borges
8992b465f5 Use regex for winscope filters
Bug: 265666404
Test: run winscope and test the filters
Change-Id: I7db71e880a196203e5c7592704fa777781d20d28
2023-02-02 14:26:11 +00:00
Kean Mariotti
f180c8eb7d Fix broken trace collection
- Fix order of accesses to TracingConfig class. The CollectTracesComponent used to fetch
configurations from TracingConfig before TraceConfigComponent changes, i.e. CollectTracesComponent
was missing the latest changes to TracingConfig.
- Remove TracingConfig initialization performed in AppComponent. Now TracingConfig takes care of
fetching the globalConfig's MODE (DEV or PROD) and initialize accordingly.
- Remove TracingConfig#isTracingConfigSet(). Now TracingConfig is always fully constructed/initialized.
- Rename various "tracing config" methods to "trace config" to reduce confusion with TracingConfig class

Fix: b/267275104
Test: npm run build:all && npm run test:all
Change-Id: I168a25f69a405422d8d983d5710d6a67773f0b48
2023-01-31 20:53:59 +00:00
Charisee Chiw
7a8661e5cc Merge "Change requests for Rust update v1.66.0" am: 1ef73b3454 am: 5a9278969f am: 33a2959059
Original change: https://android-review.googlesource.com/c/platform/development/+/2399165

Change-Id: I5ef4dfc527db171275e363a81a2d452a756dfb2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-27 01:22:12 +00:00
Charisee Chiw
33a2959059 Merge "Change requests for Rust update v1.66.0" am: 1ef73b3454 am: 5a9278969f
Original change: https://android-review.googlesource.com/c/platform/development/+/2399165

Change-Id: I64004c86e920db6d64bf95c798367ffffe81d4fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-27 00:40:19 +00:00
Charisee Chiw
5a9278969f Merge "Change requests for Rust update v1.66.0" am: 1ef73b3454
Original change: https://android-review.googlesource.com/c/platform/development/+/2399165

Change-Id: I82d3c70dc2f7f06a74804be49322b3a9f4826645
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-27 00:03:58 +00:00
Charisee
b1bf592d68 Change requests for Rust update v1.66.0
Test: ./build.py --lto=thin
Bug: 263153841
Change-Id: I7cd07a67291213dac8c80fa6b85cf746066ffb1d
2023-01-25 01:20:41 +00:00
Chris Wailes
1071ad3ce4 Merge "Fix warnings from Rust 1.65.0" am: a7b72f4a02 am: 409ead5867 am: fd21f320f2
Original change: https://android-review.googlesource.com/c/platform/development/+/2393427

Change-Id: I2a12bbbe2902f7d80e771793a04f0e27c4f1880c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-20 23:36:56 +00:00
Chris Wailes
fd21f320f2 Merge "Fix warnings from Rust 1.65.0" am: a7b72f4a02 am: 409ead5867
Original change: https://android-review.googlesource.com/c/platform/development/+/2393427

Change-Id: If9e5d4e00bc4b1399a482f116268918a223f0667
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-20 22:32:09 +00:00
Chris Wailes
409ead5867 Merge "Fix warnings from Rust 1.65.0" am: a7b72f4a02
Original change: https://android-review.googlesource.com/c/platform/development/+/2393427

Change-Id: Ic4997b87e64c363ff2ecc9e61927ac950ece7700
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-20 21:51:17 +00:00
Kean Mariotti
3a43737294 Simplify npm scripts
Test: npm run build:all && npm run test:all && npm run test:unit && npm run test:e2e
Change-Id: I765ea11dbfc1f5ab5d0ed9653789514bbc84c762
2023-01-20 13:33:10 +00:00
Chris Wailes
33e7c091f5 Fix warnings from Rust 1.65.0
Bug: 250026064
Test: m rust
Change-Id: If6428513f3d6324a2930720baa69e374ea8f4d7f
2023-01-19 16:17:21 -08:00
Kean Mariotti
eb43c13603 Fix UI issues (trace collection config)
Fix: b/265342451
Test: click trace config checkboxes + drop down lists and check they work as expected
Change-Id: I5bd8ab8bd20b15e97c9e8ca4fead94fd42337971
2023-01-19 20:56:48 +00:00
TreeHugger Robot
9ecf8cdef6 Merge "Detect changes on config checkbox click" 2023-01-19 14:34:09 +00:00
Pablo Gamito
1da4387972 Detect changes on config checkbox click
Ensure the UI shows the checkbox as being clicked immediately instead of when clicking out only.

Test: click on the trace config checkbox and make sure they are uncheck and checked as expected
Change-Id: I37471161e38f473310433a772cb0def3ab747b16
2023-01-19 13:24:10 +00:00
Frederick Mayle
bca6d703ba Merge "cargo_embargo: new cargo2android tool" am: c72989659a am: 9ed2a1bb41 am: 637e41a172
Original change: https://android-review.googlesource.com/c/platform/development/+/2315578

Change-Id: I8fe2ba2c0d01ce681128f21f3d76e160275a93c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-18 23:22:10 +00:00
Frederick Mayle
637e41a172 Merge "cargo_embargo: new cargo2android tool" am: c72989659a am: 9ed2a1bb41
Original change: https://android-review.googlesource.com/c/platform/development/+/2315578

Change-Id: Ic1c8e75b00c58fc199358656c9836eb05da65c93
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-18 22:41:36 +00:00
Frederick Mayle
9ed2a1bb41 Merge "cargo_embargo: new cargo2android tool" am: c72989659a
Original change: https://android-review.googlesource.com/c/platform/development/+/2315578

Change-Id: I0feaa29e099f406e297b26a7d75201d559fff1fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-18 22:06:05 +00:00
Frederick Mayle
77eb4ba473 cargo_embargo: new cargo2android tool
A fork of cargo2android, initially aimed at big imports like crosvm.

* Faster run time when there are many packages (30 min -> 1 min for
  crosvm).

* `--reuse-cargo-out` feature allows iterating on most of the config
  with sub second run time.

* Most options can be specified per-package.

Bug: 261486161
Test: ran on crosvm and checked diffs
Change-Id: Iaf3f4732e828a6f8b281f0e63fe1e0e1e9e98631
2023-01-18 11:48:09 -08:00
Kean Mariotti
eeac3201d1 Fix format errors
Test: npm run format:check
Change-Id: Iad318775170c4c10691c36ab8dd4b7f2574d699a
2023-01-18 16:25:43 +00:00
Kean Mariotti
5e6e22d2b4 Merge "Generate real timestamp for WM dumps" 2023-01-18 16:22:46 +00:00
Kean Mariotti
89b1bc0656 Generate real timestamp for WM dumps
Fix: b/265941075
Test: npm run build:all && npm run test:all
Change-Id: Icee5428d95e3db58c23aa4b731bc973da6d3ee94
2023-01-18 16:21:25 +00:00
Kean Mariotti
b260ff8bdb Merge changes I0cfdff9f,Ic9ae610c
* changes:
  Add correction factor in video time calculation
  Fix format errors
2023-01-18 14:06:34 +00:00
Kean Mariotti
f7febbc606 Add correction factor in video time calculation
Test: npm run build:all && npm run test:all
Change-Id: I0cfdff9fbbc15a4ad5d5a21c0f4df44335291830
2023-01-17 15:04:34 +00:00
Kean Mariotti
8df9b96528 Fix format errors
Test: npm run format:check
Change-Id: Ic9ae610c108703ac0a03751a8eb822a1366a17b5
2023-01-17 14:51:10 +00:00
Nataniel Borges
721cc64e7c Fix layer trace entry builder API
Previously the viewer had all methods in the builder because of name
mangling. With jsName annotation this issue was solved and we can now
use the correct API

Test: open winscope and take a SF dump
Change-Id: I4c1ad3dada5ce994540adb45ad04041e02a4ad39
2023-01-16 15:01:49 +00:00
Xin Li
beb6ac7802 Merge tm-qpr-dev-plus-aosp-without-vendor@9467136
Bug: 264720040
Merged-In: Ia275a2ab69ee31b7d81a2ca8c83bef08cbf107df
Change-Id: I7d4f8d91bb43f0094687c9bc74bda2d7aef3d124
2023-01-11 22:46:07 -08:00
Pablo Gamito
6707d0e070 Merge "Show all displays in surface flinger trace" 2023-01-11 15:33:27 +00:00
Nataniel Borges
1bd36f31b6 [DO NOT MERGE] Update adb proxy on tm-qpr-dev am: 48ef808621
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/20927923

Change-Id: I12a960e8046075c8a37fbe1590ba632ec028f996
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-10 13:19:37 +00:00
Nataniel Borges
48ef808621 [DO NOT MERGE] Update adb proxy on tm-qpr-dev
This will help those working on tm-dev to run the new winscope, without having to download an additional file.

Change-Id: I7aaaef7eb2ae6166bc914db81ffa1f557d4d62e1
Fixes: 264719130
Test: run the proxy, open go/winscope and check if it can collect traces
2023-01-10 10:22:22 +00:00
Pablo Gamito
4ad8a65f9c Show all displays in surface flinger trace
+ ensure displays are sorted to ensure same ordering between SF and WM trace displays

Fixes: 264688936
Test: npm run build:unit && npm run test:unit
Change-Id: If5cbeb1f14545a30da0c0181884ab74132bdde77
2023-01-10 10:05:35 +00:00
Nataniel Borges
1c7ac129dc [conflict] Merge "Update winscope proxy to version 1.0" am: 20b563e65e am: 1130743c2c am: ed61429250
Original change: https://android-review.googlesource.com/c/platform/development/+/2379888

Change-Id: I4f69afe94fc6510c5975d07c2883ba82334cb30c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-09 14:40:36 +00:00
Nataniel Borges
ed61429250 Merge "Update winscope proxy to version 1.0" am: 20b563e65e am: 1130743c2c
Original change: https://android-review.googlesource.com/c/platform/development/+/2379888

Change-Id: Ic5ccb4f15ce4830c71d52fae6d7c9a9d1e04b6b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-09 13:45:14 +00:00
Nataniel Borges
8e25c2ed36 Revert "Temporarily point winscope_proxy.py download link to Code Search"
This reverts commit 30a6979344.

Reason for revert: https://android-review.git.corp.google.com/q/topic:%22winscope-1.0%22 is updating the proxy files in aosp, this temporary fix is no longer necessary

Change-Id: I3e4d8370e0a947c8491b470cefbd04ddc6f3ef0b
2023-01-09 12:16:25 +00:00
Nataniel Borges
7353794edc Update winscope proxy to version 1.0
Bug: 264573983
Change-Id: Ie7e14b11c3b3a866a649b4e013a60fe542d3d754
Test: open winscope and proxy and dump wm and sf states
2023-01-09 12:14:09 +00:00
Kean Mariotti
30a6979344 Temporarily point winscope_proxy.py download link to Code Search
Will revert/adapt this change once the new winscope_proxy.py will
be available in AOSP as well.

Bug: b/264573983
Test: open winscope, click on "Download from Code Search"
Change-Id: I2c03c7d295465ef60c4c6c3f61399c90cb7ff1c0
2023-01-06 10:05:32 +00:00
Kean Mariotti
e75ca180ff Fix rects view (weird triangular shapes)
Rectangles with property cornerRadius === 0 could result
in weird triangular shapes being drawn instead of rectangles

Fix: b/264541479
Test: follow steps in b/264541479 and check issue is gone
Change-Id: I2421e47cdbf7c932218640f2553647ded676a80d
2023-01-05 17:04:03 +00:00
Kean Mariotti
25682f6e34 Fix title (WinscopeNg => Winscope)
Bug: b/264247967
Test: open app and check the title is 'Winscope'
Change-Id: I126a5f2f714c2fbefa42f2d7281abb9b2feb798f
2023-01-05 13:03:42 +00:00
Kean Mariotti
e1cfda57cb Fix parsing of timeline's timestamp input
Test: npm run build:all && npm run test:all
Fix: b/264504813
Change-Id: I522d5d9f47a684e013d405ed6b6395820354ef3c
2023-01-05 13:03:42 +00:00
Kean Mariotti
db3015b799 Fix tslint errors
Test: npm run build:all && npm run test:all
Change-Id: I0eb35399afc4156b93a9b1d5213c70c4baa63316
2023-01-05 13:03:42 +00:00
Kean Mariotti
80105ae0ca Add tslint
Add tslint with google3 config (google3/javascript/typescript/tslint).

Skipped google3 custom rules that need to be built and added to the project.

If needed, with some extra effort it should be possible
to get the google3 rules to build/run also in the Winscope environment.
However, it is probably simpler and quicker to run (and maybe fix?)
those checks on critique once we port Winscope to google3.

Fix: b/264505907
Test: npm run tslint:check / npm run tslint:fix
Change-Id: If3a79de673503e0c06541f0329163dee93849c3c
2023-01-05 13:03:42 +00:00
Kean Mariotti
a3d891dab6 Reorganize src/common package
- Move src/common/trace => src/trace (make its own package)
- Move src/common/utils => src/common

Fix: b/264362866
Test: npm run build:all && npm run test:all
Change-Id: I9941997d1f0f7ef5558ed75a56d48acba69e39a3
2023-01-04 11:04:41 +00:00
Kean Mariotti
9ffaca7fdb Rename source files to be google3-compliant
<name>.module.ts => <name>_module.ts
<name>.component.ts => <name>_component.ts
<name>.component.spec.ts => <name>_component_test.ts
<name>.spec.ts => <name>_test.ts
main.prod.ts => main_prod.ts
main.dev.ts => main_dev.ts

Fix: b/263471805
Test: npm run build:all && npm run test:all
Change-Id: I190c6be7a552624e7965568f04cb498305d37683
2023-01-04 09:38:50 +00:00
Kean Mariotti
fbec45f115 Fix rounded rect corners computation
Handle the case where corner radius > height/2 (or width/2)

Fix: b/264264761
Test: npm run build:all && npm run test:all
Change-Id: I9327189a3b9a59128d9ed3cc885f5887900a952a
2023-01-04 08:28:09 +00:00
Kean Mariotti
4c849366bf Rename winscope-ng => winscope
Fix: b/264247967
Test: npm install && npm run build:all && npm run test:all
Change-Id: I562e7386a1fe250f5042f2aec67d4731d4f6d3d7
2023-01-03 16:36:16 +00:00
Kean Mariotti
969b3358d7 Remove legacy Winscope
Bug: b/264247967
Test: not needed
Change-Id: I61108714c08e0a4ab2e0c5bf25931740218e68e8
2023-01-03 15:16:20 +00:00
Nataniel Borges
0d4a2d2919 Fix rects view for WM trace
The rounded corners property should be 0 on WM traces, instead of null

Fixes: 264024995
Test: open a wm trace and check rects view
Change-Id: I53e6668a8bdaa460e2e740936b719a3a4f813f8c
2023-01-01 10:31:46 +00:00
Kean Mariotti
547e0f5f4b Add cyclic dependencies check
Add new check based on tool "madge" to prevent cyclic dependencies regressions.
Madge currently reports 10 cycles. The new check makes sure we don't introduce new ones.

Bug: b/261552483
Test: npm run deps_graph:check_cycles
Change-Id: I2630ddcb94101be9b288ce0708fca3231962f406
2022-12-30 15:24:51 +00:00
Kean Mariotti
73be9787b6 The great formatting
Unleash prettier on the entire codebase

Fix: b/263471740
Test: npm run format:check && npm run lint:check
Change-Id: Ida110947bec9c9a9b385c64e126ccf6d7ad6652b
2022-12-30 15:24:43 +00:00
Kean Mariotti
83fdc7fbe0 Fix eslint errors
Test: npm run lint:check
Bug: b/263471740
Change-Id: I8289c8b22d5af5e85fd94ccebf1d82abb0a062c2
2022-12-30 11:21:46 +00:00
Kean Mariotti
1a06fc399f Set up prettier + eslint
- Add npm scripts format:check, format:fix, lint:check, lint:fix
- Include format:check + lint:check into the test suite (test:all)
- Configure eslint to play nice with prettier (basically no format checks)

Test: npm run format:check && npm run lint:check
Bug: b/263471740
Change-Id: I6f215860a24302ed04c2689ac31e4dd4e7e6fd5e
2022-12-30 11:21:46 +00:00