aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorHATAYAMA Daisuke <[email protected]>2013-07-03 15:02:22 -0700
committerLinus Torvalds <[email protected]>2013-07-03 16:07:30 -0700
commit591ff71664e764a3806e341370f3c758cb2e7e3c (patch)
tree7c6b1c4df35242c9cc395e506206ae76e608f166 /tools/perf/scripts/python/bin
parentef9e78fd2753213ea01d77f7a76a9cb6ad0f50a7 (diff)
vmcore: calculate vmcore file size from buffer size and total size of vmcore objects
The previous patches newly added holes before each chunk of memory and the holes need to be count in vmcore file size. There are two ways to count file size in such a way: 1) suppose m is a poitner to the last vmcore object in vmcore_list. Then file size is (m->offset + m->size), or 2) calculate sum of size of buffers for ELF header, program headers, ELF note segments and objects in vmcore_list. Although 1) is more direct and simpler than 2), 2) seems better in that it reflects internal object structure of /proc/vmcore. Thus, this patch changes get_vmcore_size_elf{64, 32} so that it calculates size in the way of 2). As a result, both get_vmcore_size_elf{64, 32} have the same definition. Merge them as get_vmcore_size. Signed-off-by: HATAYAMA Daisuke <[email protected]> Acked-by: Vivek Goyal <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Atsushi Kumagai <[email protected]> Cc: Lisa Mitchell <[email protected]> Cc: Zhang Yanfei <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions