Add cheap aidl tracing suitable for always-on-tracing (2/3)

Instead of having only one switch to enable all binder tracing,
we seperate between stack tracking and tracing. Stack tracking
still works as before. However, the more lightweight option,
tracing using android.os.Trace, is toggleable separately and will
work on the receiver side without dumping the entire stack trace.

We also make the tracing more efficient by caching
getTransactionName and concatting the class name.

Also, enable this selectively for SysUI+Launcher, which is
currently the focus of always-on-tracing effort to figure out
what kind of binder calls these processes are calling which seems
to contribute a huge amount of jank (long binder calls are in
>= 50% of janky traces).

Test: external/perfetto/tools/record_android_trace gfx view freq sched wm am aidl
Test: atest aidl_unittest
Bug: 202278427
Change-Id: Ic71fd925c6df71f82ddacfb42360b86257feb1cb
Merged-In: Ic71fd925c6df71f82ddacfb42360b86257feb1cb
1 file changed
tree: b7b656f5b6dd47eb4a0e907adb86cdc90308685d
  1. aidl_api/
  2. build/
  3. metadata/
  4. permission/
  5. tests/
  6. trace/
  7. aidl-format.sh
  8. aidl.cpp
  9. aidl.h
  10. aidl_checkapi.cpp
  11. aidl_checkapi.h
  12. aidl_const_expressions.cpp
  13. aidl_dumpapi.cpp
  14. aidl_dumpapi.h
  15. aidl_language.cpp
  16. aidl_language.h
  17. aidl_language_l.ll
  18. aidl_language_y.yy
  19. aidl_to_cpp.cpp
  20. aidl_to_cpp.h
  21. aidl_to_cpp_common.cpp
  22. aidl_to_cpp_common.h
  23. aidl_to_java.cpp
  24. aidl_to_java.h
  25. aidl_to_ndk.cpp
  26. aidl_to_ndk.h
  27. aidl_to_rust.cpp
  28. aidl_to_rust.h
  29. aidl_typenames.cpp
  30. aidl_typenames.h
  31. aidl_unittest.cpp
  32. Android.bp
  33. ast_java.cpp
  34. ast_java.h
  35. ast_java_unittest.cpp
  36. check_valid.cpp
  37. check_valid.h
  38. code_writer.cpp
  39. code_writer.h
  40. code_writer_unittest.cpp
  41. comments.cpp
  42. comments.h
  43. diagnostics.cpp
  44. diagnostics.h
  45. diagnostics.inc
  46. diagnostics_unittest.cpp
  47. generate_aidl_mappings.cpp
  48. generate_aidl_mappings.h
  49. generate_cpp.cpp
  50. generate_cpp.h
  51. generate_cpp_unittest.cpp
  52. generate_java.cpp
  53. generate_java.h
  54. generate_java_binder.cpp
  55. generate_ndk.cpp
  56. generate_ndk.h
  57. generate_rust.cpp
  58. generate_rust.h
  59. hiddenapi-greylist
  60. import_resolver.cpp
  61. import_resolver.h
  62. io_delegate.cpp
  63. io_delegate.h
  64. io_delegate_unittest.cpp
  65. location.cpp
  66. location.h
  67. logging.cpp
  68. logging.h
  69. main.cpp
  70. NOTICE
  71. options.cpp
  72. options.h
  73. options_unittest.cpp
  74. os.h
  75. OWNERS
  76. parser.cpp
  77. parser.h
  78. preprocess.cpp
  79. preprocess.h
  80. PREUPLOAD.cfg
  81. README.md
  82. run_integration_tests.sh
  83. TEST_MAPPING
README.md

Documentation for this project is currently maintained here:

https://source.android.com/devices/architecture/aidl/overview