Hi. On 2006/04/24 11:28:28 -0400, Vivek Goyal <[EMAIL PROTECTED]> wrote: >To begin with probably you can keep those values for newly created headers >but eventually we need this utility to walk through the page tables or >vm list to fill those headers with appropriate virtual addresses so that >gdb can do module debugging as well. And walking through the data structures OK. I specified 0xffffffffffffffff for virtual addresses in all the segments. In the future, we need to get a structure size and a field offset for walking through the page tables or vm list.
I added an ELF dump option(-E) to the "partial dump" command. The command
doesn't need the map_file, and it will exclude pages when it finds 256
consecutive pages filled with zero. When using crash to analyze the ELF dump
file, an error occurs when trying to access the content of the pages excluded
from the ELF file. This problem does not occur using gdb. I'm not sure if this
is a bug or a feature.
The new command operates only on linux2.6.15.1(or 2.6.15.4), i386.
Changelog:
- add ELF dump option(-E).
- enable to exclude only page filled by zero without a map_file.
Usage:
makedumpfile [-c] [-d dump_level] [-E] [map_file] dump_mem dump_file
Description:
[-c]:
This option enables the compression function of each page.
[-d dump_level]:
The excluding page is specified by this value.
[-E]:
Create the ELF dumpfile.
[map_file]:
This is a pathname to a system.map file of first-kernel.
dump_mem:
This is a pathname to a first-kernel memory core image.
dump_file:
This is a pathname to a filename created by this command.
Example 1:
If you want to create an ELF dump file exclusing pages filled by zero,
please execute the following command.
# makedumpfile -E -d 1 /proc/vmcore dumpfile
Example 2:
If you want to exclude pages filled by zero, cache pages and user pages,
and to enable compression, please execute the following command.
# makedumpfile -c -d 15 /boot/System.map /proc/vmcore dumpfile
TODO:
1. get a structure size and a field offset.
There are two methods.
- implement the gdb feature getting the debug information from
vmlinux (with -g).
- change systemcall to bury above information into the PT_NOTE
segment.
2. get the memory management information from the symbol "pgdat_list".
3. exclude free pages.
4. (i386) fill PT_LOAD headers with appropriate virtual addresses.
Test environment:
I confirmed this command operated in the following environment.
---------------------------------------------
arch : i386smp
memory: 1GB
kernel: 2.6.15.1
crash : crash-4.0-2.22
panic : echo c > /proc/sysrq-trigger
load : nothing
---------------------------------------------
Test result:
The following result was measured on an i386smp server when the system
was idle.
-----------------------------------------
format |level |compress |file_size(MB)
----------+------+---------+-------------
"vmcore" | - | - | 1,007
ELF | 1 | off | 230
diskdump | 1 | off | 230
diskdump | 1 | on | 96
ELF | 15 | off | 180
diskdump | 15 | off | 87
diskdump | 15 | on | 36
-----------------------------------------
level 1 : Exclude zero pages.
level 15 : Exclude zero pages, cache pages, and user process data pages.
compress off: disable the compression function of each page.
compress on: enable the compression function of each page.
Thanks
Ken'ichi Ohmichi
makedumpfile.tar.gz
Description: Binary data
_______________________________________________ fastboot mailing list [email protected] https://lists.osdl.org/mailman/listinfo/fastboot
