This directory contains code that accesses Android (hw)binder interfaces and is dynamically loaded and used by traced_probes. The code in this directory is built as a separate .so library and can depend on on Android internals.
Block diagram:
+---------------+ +---------------------------------+ | traced_probes |- - -> | libperfetto_android_internal.so | +---------------+ ^ +---------------+-----------------+ | | | | [ Non-NDK libraries ] | +-> libbase.so | +-> libutils.so | +-> libhidltransport.so | +-> libhwbinder.so | +-> android.hardware.xxx@2.0 | + dynamically loaded on first use via dlopen()
The major reason for using a separate .so() and introducing the shared library layer is avoiding the cost of linker relocations (~150 KB private dirty) required for loading the graph of binder-related libraries.
The general structure and rules for code in this directory is as-follows: