All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>
To: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Cc: V Srivatsa <vsrivatsa@in.ibm.com>, Reinhard <BUENDGEN@de.ibm.com>,
	kexec@lists.infradead.org,
	Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
	Dave Anderson <anderson@redhat.com>
Subject: Re: [PATCH v2 7/8] makedumpfile: Add erased information in compressed kdump file
Date: Tue, 6 Sep 2011 21:14:52 +0530	[thread overview]
Message-ID: <20110906154452.GA18186@in.ibm.com> (raw)
In-Reply-To: <20110822115757.GA23157@in.ibm.com>

On 2011-08-22 17:27:58 Mon, Mahesh J Salgaonkar wrote:
> On 2011-08-19 15:16:59 Fri, Ken'ichi Ohmichi wrote:
> > 
> > Hi Mahesh,
> > 
> > Sorry about many responses of this patch.
> > 
> > On Wed, 18 May 2011 01:36:17 +0530
> > Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com> wrote:
> > >
> > > From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
> > > 
> > > Include the erase information in the makedumpfile generated dumpfile. The
> > > erased information contains only effective lines from the filter
> > > configuration file. This patch supports inclusion of erase information in
> > > kdump compressed, flatten and split dumpfiles. On re-filtering, the erase
> > > information from input dumpfile (if any) will be carried over to resulting
> > > dumpfile.
> > > 
> > > This patch introduces new members offset_eraseinfo, size_eraseinfo into the
> > > sub header in compressed kdump file.
> > > 
> > > The erased information would contain *multiple* erased symbol names.
> > > For example, the following is based on your above example.
> > > 
> > > 	struct S1 {
> > > 		int a;
> > > 		int b;
> > > 		int c;
> > > 	};
> > > 	struct S2 {
> > > 		struct S1 *mystruct1;
> > > 		struct S1 *mystruct2;
> > > 	};
> > > 
> > > 	struct S2 mystruct2;
> > > 
> > > 	#Filter command
> > > 	erase mystruct2.mystruct1.a
> > > 	erase mystruct2.mystruct1.c
> > > 	erase mystruct2.mystruct2.b
> > > 
> > > 	#The erased information
> > > 	erase mystruct2.mystruct1.a 4
> > > 	erase mystruct2.mystruct1.c 4
> > > 	erase mystruct2.mystruct2.b 4
> > 
> > While testing this feature, I noticed the description format of
> > makedumpfile.conf is different from the one of eraseinfo.
> > The former contains "size", but the later does not.
> > 
> > Are there any reasons of different formats ?
> 
> There is no specific reason, since it is just an information I thought we
> can follow a simple format.
> 
> > I feel the same format will be useful.
> 
> Sure, will make the change.
> 
> Thanks,
> -Mahesh.

Hi Ken'ichi,

Please find the patch below that now maintain the same format for
eraseinfo data.

Thanks,
-Mahesh.


makedumpfile: Use the same format as erase commands for eraseinfo data.

From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>

The format of eraseinfo data differs from that of erase commands. This patch
makes sure eraseinfo data format is same as erase commands.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
 IMPLEMENTATION |    4 ++--
 makedumpfile.c |    4 ++--
 makedumpfile.h |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/IMPLEMENTATION b/IMPLEMENTATION
index c11bd36..f0f3135 100644
--- a/IMPLEMENTATION
+++ b/IMPLEMENTATION
@@ -26,9 +26,9 @@
     |                        :                 |
     |         page data (pfn Z)                |
     +------------------------------------------+ offset_eraseinfo
-    | erase mystruct2.mystruct1.var 4          |
+    | erase mystruct2.mystruct1.var size 4     |
     | erase mystruct2.mystruct1.ptr nullify    |
-    | erase mystruct2.mystruct.array 100       |
+    | erase mystruct2.mystruct.array size 100  |
     +------------------------------------------+
 
 
diff --git a/makedumpfile.c b/makedumpfile.c
index 1a88171..2c49bbe 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -3949,7 +3949,7 @@ write_elf_header(struct cache_data *cd_header)
 		if (fl_info->nullify)
 			sprintf(size_str, "nullify\n");
 		else
-			sprintf(size_str, "%ld\n", fl_info->size);
+			sprintf(size_str, "size %ld\n", fl_info->size);
 
 		size_eraseinfo += strlen("erase ") +
 				strlen(ei->symbol_expr) + 1 +
@@ -4799,7 +4799,7 @@ write_eraseinfo(struct cache_data *cd_page, unsigned long *size_out)
 			continue;
 		for (j = 0; j < erase_info[i].num_sizes; j++) {
 			if (erase_info[i].sizes[j] > 0)
-				sprintf(size_str, "%ld\n",
+				sprintf(size_str, "size %ld\n",
 						erase_info[i].sizes[j]);
 			else if (erase_info[i].sizes[j] == -1)
 				sprintf(size_str, "nullify\n");
diff --git a/makedumpfile.h b/makedumpfile.h
index 8b1bd4f..2741903 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -411,7 +411,7 @@ do { \
 
 #define SIZE_XEN_CRASH_INFO_V2	(sizeof(unsigned long) * 10)
 
-#define MAX_SIZE_STR_LEN (21)
+#define MAX_SIZE_STR_LEN (26)	/* strlen("size ") + 21 */
 
 /*
  * The value of dependence on machine


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2011-09-06 15:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 20:06 [PATCH v2 7/8] makedumpfile: Add erased information in compressed kdump file Mahesh J Salgaonkar
2011-08-12  8:10 ` Ken'ichi Ohmichi
2011-08-18  8:14   ` Mahesh Jagannath Salgaonkar
2011-08-19  5:39     ` Ken'ichi Ohmichi
2011-08-16  1:00 ` Ken'ichi Ohmichi
2011-08-16 10:16   ` Mahesh Jagannath Salgaonkar
2011-08-19  6:16 ` Ken'ichi Ohmichi
2011-08-22 11:57   ` Mahesh J Salgaonkar
2011-09-06 15:44     ` Mahesh J Salgaonkar [this message]
2011-09-07  6:59       ` Ken'ichi Ohmichi
2011-09-12 18:24       ` makedumpfile: Add erased information in compressed kdump file and ELF formatted dumpfile Dave Anderson
2011-09-13 11:16         ` Mahesh Jagannath Salgaonkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110906154452.GA18186@in.ibm.com \
    --to=mahesh@linux.vnet.ibm.com \
    --cc=BUENDGEN@de.ibm.com \
    --cc=ananth@in.ibm.com \
    --cc=anderson@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=oomichi@mxs.nes.nec.co.jp \
    --cc=vsrivatsa@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.