diff options
| author | Mauricio Vásquez <[email protected]> | 2022-02-15 17:58:54 -0500 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2022-02-16 10:10:42 -0800 |
| commit | dc695516b6f5cb322b95de7ef3a6ec1db707ff8b (patch) | |
| tree | d06d94211dc7939318ea370d5ca7eefeb988d8e0 /tools/perf/scripts/python/syscall-counts.py | |
| parent | a9caaba399f9cff34c6bffa1b1fd673d3d6043a0 (diff) | |
bpftool: Implement btfgen_get_btf()
The last part of the BTFGen algorithm is to create a new BTF object with
all the types that were recorded in the previous steps.
This function performs two different steps:
1. Add the types to the new BTF object by using btf__add_type(). Some
special logic around struct and unions is implemented to only add the
members that are really used in the field-based relocations. The type
ID on the new and old BTF objects is stored on a map.
2. Fix all the type IDs on the new BTF object by using the IDs saved in
the previous step.
Signed-off-by: Mauricio Vásquez <[email protected]>
Signed-off-by: Rafael David Tinoco <[email protected]>
Signed-off-by: Lorenzo Fontana <[email protected]>
Signed-off-by: Leonardo Di Donato <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions