Return-Path: yishimat@redhat.com Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO zmta01.collab.prod.int.phx2.redhat.com) (10.5.81.8) by zmail24.collab.prod.int.phx2.redhat.com with LMTP; Thu, 2 Jul 2015 01:10:45 -0400 (EDT) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5C0B61835A9; Thu, 2 Jul 2015 01:10:45 -0400 (EDT) Received: from [10.3.112.13] ([10.3.112.13]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t625AhFu027595; Thu, 2 Jul 2015 01:10:43 -0400 Subject: [RHEL7.2 PATCH resend v3 5/5] Add support for --splitblock-size. To: kexec-kdump-list@redhat.com References: <55929D94.4020500@redhat.com> <5594C62C.3030407@redhat.com> Cc: Minfei Huang , bhe@redhat.com, yishimat@redhat.com From: Yasuaki Ishimatsu Message-ID: <5594C7D2.8030300@redhat.com> Date: Thu, 2 Jul 2015 01:10:42 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <5594C62C.3030407@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Content-Length: 4028 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1182379 The patch is back ported directory from the following upstream commit: commit 33521799757a52f0e97cbfb7c6a5e24de3b8cb50 Author: Zhou Wenjian Date: Fri Nov 7 09:45:04 2014 +0900 [PATCH v5 5/5] Add support for --splitblock-size. Use --splitblock-size to specify splitblock size (KB) When --split is specified in cyclic mode,splitblock table will be generated in create_dump_bitmap(). Signed-off-by: Qiao Nuohan Signed-off-by: Zhou Wenjian Resolves: rhbz#1182379 Signed-off-by: Yasuaki Ishimatsu --- makedumpfile-1.5.7/makedumpfile.8 | 10 ++++++++++ makedumpfile-1.5.7/makedumpfile.c | 4 ++++ makedumpfile-1.5.7/makedumpfile.h | 1 + makedumpfile-1.5.7/print_info.c | 5 +++++ 4 files changed, 20 insertions(+), 0 deletions(-) diff --git a/makedumpfile-1.5.7/makedumpfile.8 b/makedumpfile-1.5.7/makedumpfile.8 index 9cb12c0..5e121fd 100644 --- a/makedumpfile-1.5.7/makedumpfile.8 +++ b/makedumpfile-1.5.7/makedumpfile.8 @@ -386,6 +386,16 @@ size, so ordinary users don't need to specify this option. # makedumpfile \-\-cyclic\-buffer 1024 \-d 31 \-x vmlinux /proc/vmcore dumpfile .TP +\fB\-\-splitblock\-size\fR \fIsplitblock_size\fR +Specify the splitblock size in kilo bytes for analysis in the cyclic mode with --split. +If --splitblock N is specified, difference of each splitted dumpfile size is at most N +kilo bytes. +.br +.B Example: +.br +# makedumpfile \-\-splitblock\-size 1024 \-d 31 \-x vmlinux \-\-split /proc/vmcore dumpfile1 dumpfile2 + +.TP \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-1.5.7/makedumpfile.c b/makedumpfile-1.5.7/makedumpfile.c index c4309af..f3e76c9 100644 --- a/makedumpfile-1.5.7/makedumpfile.c +++ b/makedumpfile-1.5.7/makedumpfile.c @@ -9570,6 +9570,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}, + {"splitblock-size", required_argument, NULL, OPT_SPLITBLOCK_SIZE}, {0, 0, 0, 0} }; @@ -9710,6 +9711,9 @@ main(int argc, char *argv[]) case OPT_CYCLIC_BUFFER: info->bufsize_cyclic = atoi(optarg); break; + case OPT_SPLITBLOCK_SIZE: + info->splitblock_size = atoi(optarg); + break; case '?': MSG("Commandline parameter is invalid.\n"); MSG("Try `makedumpfile --help' for more information.\n"); diff --git a/makedumpfile-1.5.7/makedumpfile.h b/makedumpfile-1.5.7/makedumpfile.h index f9d9332..0cb54a3 100644 --- a/makedumpfile-1.5.7/makedumpfile.h +++ b/makedumpfile-1.5.7/makedumpfile.h @@ -1885,6 +1885,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_SPLITBLOCK_SIZE OPT_START+15 /* * Function Prototype. diff --git a/makedumpfile-1.5.7/print_info.c b/makedumpfile-1.5.7/print_info.c index f6342d3..efdf578 100644 --- a/makedumpfile-1.5.7/print_info.c +++ b/makedumpfile-1.5.7/print_info.c @@ -203,6 +203,11 @@ print_usage(void) MSG(" By default, BUFFER_SIZE will be calculated automatically depending on\n"); MSG(" system memory size, so ordinary users don't need to specify this option.\n"); MSG("\n"); + MSG(" [--splitblock-size SPLITBLOCK_SIZE]:\n"); + MSG(" Specify the splitblock size in kilo bytes for analysis in the cyclic mode\n"); + MSG(" with --split. If --splitblock N is specified, difference of each splitted\n"); + MSG(" dumpfile size is at most N kilo bytes.\n"); + MSG("\n"); MSG(" [--non-cyclic]:\n"); MSG(" Running in the non-cyclic mode, this mode uses the old filtering logic\n"); MSG(" same as v1.4.4 or before.\n"); -- 1.7.1