tree: b92b129c53b18334fff4f7a7e623627e9a4bbf16 [path history] [tgz]
  1. hooks/
  2. loaders/
  3. protos/
  4. src/
  5. .eslintrc.js
  6. .gitignore
  7. .prettierignore
  8. all
  9. google.tslint.json
  10. karma.config.ci.js
  11. karma.config.common.js
  12. karma.config.dev.js
  13. OWNERS
  14. package-lock.json
  15. package.json
  16. prettier.config.js
  17. protractor.config.js
  18. README.md
  19. tsconfig.json
  20. webpack.config.common.js
  21. webpack.config.dev.js
  22. webpack.config.prod.js
tools/winscope/README.md

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

Build & test & deploy changes

  • Navigate to development/tools/winscope
  • Run npm run to get the list of available commands

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