aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorHATAYAMA Daisuke <[email protected]>2013-07-03 15:02:14 -0700
committerLinus Torvalds <[email protected]>2013-07-03 16:07:30 -0700
commitf2bdacdd597d8d05c3d5f5d36273084f7ef7e6f5 (patch)
tree0b4f6028758b71e60ddb1d30c36bbdf4a2b1e21d /tools/perf/scripts/python/bin
parentb27eb186608c89ef0979ae47c649859ceaa1b2e7 (diff)
vmcore: allocate buffer for ELF headers on page-size alignment
Allocate ELF headers on page-size boundary using __get_free_pages() instead of kmalloc(). Later patch will merge PT_NOTE entries into a single unique one and decrease the buffer size actually used. Keep original buffer size in variable elfcorebuf_sz_orig to kfree the buffer later and actually used buffer size with rounded up to page-size boundary in variable elfcorebuf_sz separately. The size of part of the ELF buffer exported from /proc/vmcore is elfcorebuf_sz. The merged, removed PT_NOTE entries, i.e. the range [elfcorebuf_sz, elfcorebuf_sz_orig], is filled with 0. Use size of the ELF headers as an initial offset value in set_vmcore_list_offsets_elf{64,32} and process_ptload_program_headers_elf{64,32} in order to indicate that the offset includes the holes towards the page boundary. As a result, both set_vmcore_list_offsets_elf{64,32} have the same definition. Merge them as set_vmcore_list_offsets. [[email protected]: add free_elfcorebuf(), cleanups] 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