Hi. Thanks for your comments of an old command of "Partial dump".
I fed back your comments to this new command.

The old command had problems that it creates crash dump files with
holes, and the files is expanded if they are backed up, or copied using
unappropriate commands.  However, just adding ELF header for each
discontiguous data will result in a large number of segment headers.
When I tested this approach, more than 1500 PT_LOAD was created for 1GB
vmcore.

Instead, I adopted the diskdump compression format as dump file format. 
The diskdump compression format is able to handle discontiguous data
without creating segment headers for each chunk, and can further reduce
the file size because data in each page is now compressed.  Moreover,
the current version of crash can handle the resulting dump file without
any modification.

What do you think of the attached command?
Any suggestions for idea to achieve a better "Partial dump" is welcome.

The new command operates only on linux2.6.15.1(or 2.6.15.4), i386.


Changelog:
  - change the dump file format to the diskdump compression format.
  - add the compression function of each page.

Usage:
  makedumpfile [-c] [-d dump_level] map_file dump_mem dump_file

Example:
  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


Test environment:
  I confirmed this command operated in the following environment.
  ---------------------------------------------
   arch  : i386up, i386smp
   memory: 1GB
   kernel: 2.6.15.1, 2.6.15.4
   crash : crash-4.0-2.22
  ---------------------------------------------

Test result:
  The test result on the i386up is as follows.
  ---------------------------------------------
  level compress | run_time    file_size(bytes)
  ---------------+-----------------------------
   "cp command"  | 0m14.829s   1,006,240,252
    0      off   | 0m16.731s   1,012,209,408
    0       on   | 0m41.918s     156,994,819
   15      off   | 0m03.532s      96,005,832
   15       on   | 0m09.428s      39,715,931
  ---------------------------------------------

TODO:
  - get a structure size and a field offset.
    There are two methods.
    1. implement the gdb feature getting the debug information from
       vmlinux (with -g).
    2. change systemcall to bury above information into the PT_NOTE
       segment.
  - get the memory management information from the symbol "pgdat_list".
  - exclude free pages.

Thanks
Ken'ichi Ohmichi

Attachment: makedumpfile.tar.gz
Description: Binary data

_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to