diff options
author | Yafang Shao <laoar.shao@gmail.com> | 2023-03-05 12:46:07 +0000 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-03-07 09:33:42 -0800 |
commit | fa5e83df173beb6c1334737a463fc2b4ef4efa8b (patch) | |
tree | bf570ec5622964c0532f9d0efa7f5502f3555c81 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 835f1fca951303930b2c74c5b0abe3c03a3aeadf (diff) |
bpf: devmap memory usage
A new helper is introduced to calculate the memory usage of devmap and
devmap_hash. The number of dynamically allocated elements are recored
for devmap_hash already, but not for devmap. To track the memory size of
dynamically allocated elements, this patch also count the numbers for
devmap.
The result as follows,
- before
40: devmap name count_map flags 0x80
key 4B value 4B max_entries 65536 memlock 524288B
41: devmap_hash name count_map flags 0x80
key 4B value 4B max_entries 65536 memlock 524288B
- after
40: devmap name count_map flags 0x80 <<<< no elements
key 4B value 4B max_entries 65536 memlock 524608B
41: devmap_hash name count_map flags 0x80 <<<< no elements
key 4B value 4B max_entries 65536 memlock 524608B
Note that the number of buckets is same with max_entries for devmap_hash
in this case.
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/r/20230305124615.12358-11-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions