diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2022-07-15 08:31:44 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-07-19 19:45:34 +0300 |
commit | d937bc3449fa868cbeaf5c87576f9929b765c1e0 (patch) | |
tree | 8ff4872e0ead2666177b162d0320e2bf959f0e93 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 87ac0d600943994444e24382a87aa19acc4cd3d4 (diff) | |
download | linux-d937bc3449fa868cbeaf5c87576f9929b765c1e0.tar.xz |
bpf: make uniform use of array->elem_size everywhere in arraymap.c
BPF_MAP_TYPE_ARRAY is rounding value_size to closest multiple of 8 and
stores that as array->elem_size for various memory allocations and
accesses.
But the code tends to re-calculate round_up(map->value_size, 8) in
multiple places instead of using array->elem_size. Cleaning this up and
making sure we always use array->size to avoid duplication of this
(admittedly simple) logic for consistency.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20220715053146.1291891-3-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions