Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
BUILD.gn | D | 23-Nov-2023 | 2.5 KiB | 95 | 88 | |
README.md | D | 23-Nov-2023 | 1.7 KiB | 36 | 31 | |
atrace_hal.cc | D | 23-Nov-2023 | 2.6 KiB | 95 | 61 | |
atrace_hal.h | D | 23-Nov-2023 | 1.7 KiB | 60 | 21 | |
empty_file.cc | D | 23-Nov-2023 | 830 | 22 | 2 | |
health_hal.cc | D | 23-Nov-2023 | 2.5 KiB | 95 | 56 | |
health_hal.h | D | 23-Nov-2023 | 1.4 KiB | 53 | 20 | |
incident_service.cc | D | 23-Nov-2023 | 1.7 KiB | 58 | 31 | |
incident_service.h | D | 23-Nov-2023 | 1.3 KiB | 45 | 15 | |
lazy_library_loader.cc | D | 23-Nov-2023 | 2.4 KiB | 82 | 48 | |
lazy_library_loader.h | D | 23-Nov-2023 | 1.8 KiB | 46 | 13 | |
power_stats.cc | D | 23-Nov-2023 | 12.4 KiB | 394 | 301 | |
power_stats.h | D | 23-Nov-2023 | 3.3 KiB | 110 | 42 | |
statsd_logging.cc | D | 23-Nov-2023 | 1.3 KiB | 40 | 17 | |
statsd_logging.h | D | 23-Nov-2023 | 1.3 KiB | 45 | 19 | |
tracing_service_proxy.cc | D | 23-Nov-2023 | 1.4 KiB | 45 | 21 | |
tracing_service_proxy.h | D | 23-Nov-2023 | 1,016 | 33 | 11 |
README.md
1This directory contains code that accesses Android (hw)binder interfaces and is 2dynamically loaded and used by traced_probes / perfetto command line client. 3The code in this directory is built as a separate .so library and can depend on 4on Android internals. 5 6Block diagram: 7 8``` 9+---------------+ +---------------------------------+ 10| traced_probes |- - -> | libperfetto_android_internal.so | 11+---------------+ ^ +---------------+-----------------+ 12 | | 13 | | [ Non-NDK libraries ] 14 | +-> libbase.so 15 | +-> libutils.so 16 | +-> libhidltransport.so 17 | +-> libhwbinder.so 18 | +-> android.hardware.xxx@2.0 19 | 20 + dynamically loaded on first use via dlopen() 21``` 22 23The major reason for using a separate .so() and introducing the shared library 24layer is avoiding the cost of linker relocations (~150 KB private dirty) 25required for loading the graph of binder-related libraries. 26 27The general structure and rules for code in this directory is as-follows: 28- Targets herein defined must be leaf targets. Dependencies to perfetto targets 29 (e.g. base) are not allowed, as doing that would create ODR violations. 30- Headers (e.g. health_hal.h) must have a plain old C interface (to avoid 31 dealing with name mangling) and should not expose neither android internal 32 structure/types nor struct/types defined in perfetto headers outside of this 33 directory. 34- Dependencies to Android internal headers are allowed only in .cc files, not 35 in headers. 36