Files
android_development/tools/winscope
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
..
2017-12-19 15:15:30 -08:00
2021-10-13 15:20:22 +00:00
2020-05-20 08:49:15 -07:00
2020-06-19 17:44:29 +01:00
2020-08-26 11:01:35 +02:00
2020-11-30 11:51:57 +00:00
2020-06-03 18:31:43 +01:00

Tool for visualizing window manager traces

Developing WinScope

When the trace is enabled, Window Manager and Surface Flinger capture and save current state to a file at each point of interest. frameworks/base/core/proto/android/server/windowmanagertrace.proto and frameworks/native/services/surfaceflinger/layerproto/layerstrace.proto contain the proto definitions for their internal states.

Checking out code and setting up environment

Building & testing changes

  • Navigate to development/tools/winscope
  • Run yarn run dev

Update IntDefMapping

  • Build framework-minus-apex-intdefs module and a preprocessor will generate the latest IntDefMapping. From the ANDROID_ROOT run:
. build/envsetup.sh
m framework-minus-apex-intdefs
  • Copy the generated intDefMapping.json files to the prebuilts repo.
python3 -c 'import sys,json,collections; print(json.dumps(collections.OrderedDict(sorted(collections.ChainMap(*map(lambda x:json.load(open(x)), sys.argv[1:])).items())), indent=2))' $(find out/soong/.intermediates/frameworks/base -iname intDefMapping.json) > ./prebuilts/misc/common/winscope/intDefMapping.json
  • Upload the changes.
cd ./prebuilts/misc/common/winscope
repo start intdef-update
git commit -am "Update intdef mapping" "Test: N/A"
repo upload --cbr .

Building with internal extensions

Internal paths in vendor/ which are not available in AOSP must be replaced by stub files. See getWaylandSafePath for an example