• Home
Name Date Size #Lines LOC

..--

BUILD.gnD03-May-20242.5 KiB9588

README.mdD03-May-20241.7 KiB3631

atrace_hal.ccD03-May-20242.6 KiB9561

atrace_hal.hD03-May-20241.7 KiB6021

empty_file.ccD03-May-2024830 222

health_hal.ccD03-May-20242.5 KiB9556

health_hal.hD03-May-20241.4 KiB5320

incident_service.ccD03-May-20241.7 KiB5831

incident_service.hD03-May-20241.3 KiB4515

lazy_library_loader.ccD03-May-20242.4 KiB8248

lazy_library_loader.hD03-May-20241.8 KiB4613

power_stats.ccD03-May-202412.4 KiB394301

power_stats.hD03-May-20243.3 KiB11042

statsd_logging.ccD03-May-20241.3 KiB4017

statsd_logging.hD03-May-20241.3 KiB4519

tracing_service_proxy.ccD03-May-20241.4 KiB4521

tracing_service_proxy.hD03-May-20241,016 3311

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