Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
gen/ | 23-Mar-2024 | - | 555,634 | 555,286 | ||
include/ | 23-Mar-2024 | - | 62 | 24 | ||
regen/ | 23-Mar-2024 | - | 841 | 596 | ||
Android.bp | D | 23-Mar-2024 | 2.9 KiB | 84 | 73 | |
README.md | D | 23-Mar-2024 | 1 KiB | 26 | 18 | |
gen_bench.sh | D | 23-Mar-2024 | 2.6 KiB | 84 | 47 | |
linker_reloc_bench.cpp | D | 23-Mar-2024 | 2.2 KiB | 58 | 17 | |
run_bench_with_ninja.sh | D | 23-Mar-2024 | 4.5 KiB | 155 | 102 |
README.md
1# Dynamic Linker Relocation Benchmark 2 3This benchmark measures the time spent in the dynamic linker to load a large set 4of shared objects with many symbols and relocations. It mimics the work involved 5in loading a fixed version of `libandroid_servers.so`. 6 7## Running the benchmark 8 9To run the benchmark, build the `linker-reloc-bench` target, sync `data`, and 10run the benchmark from `/data/benchmarktest[64]/linker-reloc-bench`. 11 12There is also a `run_bench_with_ninja.sh` script that uses the 13`gen_bench.py --ninja` mode to generate a benchmark. It's useful for 14experimentation. The `--cc` and `--linker` flags allow swapping out different 15static and dynamic linkers. 16 17## Regenerating the synthetic benchmark 18 19`regen/dump_relocs.py` scans an ELF file and its dependencies, outputting a JSON 20dump, then `regen/gen_bench.py` processes the JSON file into benchmark code. 21`gen_bench.py` has two modes: 22 23 - (default) generate Android.bp and source files 24 - with `--ninja`: generate a build.ninja instead, and build a set of ELF file 25 outputs 26