>Use --block-size to specify block size (KB) >When --split is specified in cyclic mode,block table will be >generated in get_num_dumpable_cyclic. > >Signed-off-by: Qiao Nuohan <qiaonuohan at cn.fujitsu.com> >Signed-off-by: Zhou Wenjian <zhouwj-fnst at cn.fujitsu.com> >--- > makedumpfile.8 | 16 ++++++++++++++++ > makedumpfile.c | 4 ++++ > makedumpfile.h | 1 + > 3 files changed, 21 insertions(+), 0 deletions(-) > >diff --git a/makedumpfile.8 b/makedumpfile.8 >index 9cb12c0..a384213 100644 >--- a/makedumpfile.8 >+++ b/makedumpfile.8 >@@ -386,6 +386,22 @@ size, so ordinary users don't need to specify this option. > # makedumpfile \-\-cyclic\-buffer 1024 \-d 31 \-x vmlinux /proc/vmcore dumpfile > > .TP >+\fB\-\-block\-size\fR \fIblock_size\fR >+Specify the block size in kilo bytes for analysis in the cyclic mode with --split. >+In the cyclic split mode, the number of blocks is represented as: >+ >+ num_of_blocks = system_memory / (\fIblock_size\fR * 1KB ) >+ >+The larger number of block, the faster working speed is expected, but the more memory will >+be taken. By default, \fIblock_size\fR will be set as 1GB, so ordinary users don't need to >+specify this option. >+ >+.br >+.B Example: >+.br >+# makedumpfile \-\-block\-size 10240 \-d 31 \-x vmlinux \-\-split /proc/vmcore dumpfile1 dumpfile2 >+ >+.TP Also print_usage() in print_info.c should be modified. Thanks, Atsushi Kumagai > \fB\-\-non\-cyclic\fR > Running in the non-cyclic mode, this mode uses the old filtering logic same as v1.4.4 or before. > If you feel the cyclic mode is too slow, please try this mode. >diff --git a/makedumpfile.c b/makedumpfile.c >index 3e66346..405d935 100644 >--- a/makedumpfile.c >+++ b/makedumpfile.c >@@ -9571,6 +9571,7 @@ static struct option longopts[] = { > {"eppic", required_argument, NULL, OPT_EPPIC}, > {"non-mmap", no_argument, NULL, OPT_NON_MMAP}, > {"mem-usage", no_argument, NULL, OPT_MEM_USAGE}, >+ {"block-size", required_argument, NULL, OPT_BLOCK_SIZE}, > {0, 0, 0, 0} > }; > >@@ -9711,6 +9712,9 @@ main(int argc, char *argv[]) > case OPT_CYCLIC_BUFFER: > info->bufsize_cyclic = atoi(optarg); > break; >+ case OPT_BLOCK_SIZE: >+ info->block_size = atoi(optarg); >+ break; > case '?': > MSG("Commandline parameter is invalid.\n"); > MSG("Try `makedumpfile --help' for more information.\n"); >diff --git a/makedumpfile.h b/makedumpfile.h >index ed4f799..56d2c79 100644 >--- a/makedumpfile.h >+++ b/makedumpfile.h >@@ -1883,6 +1883,7 @@ struct elf_prstatus { > #define OPT_EPPIC OPT_START+12 > #define OPT_NON_MMAP OPT_START+13 > #define OPT_MEM_USAGE OPT_START+14 >+#define OPT_BLOCK_SIZE OPT_START+15 > > /* > * Function Prototype. >-- >1.7.1 > > >_______________________________________________ >kexec mailing list >kexec at lists.infradead.org >http://lists.infradead.org/mailman/listinfo/kexec