Skip to contentSkip to conversation

Add more debug infos when usable memory range changing

PATCH Applied Han Pingtian 2 participants 2 messages Apr 13, 2012 – Apr 16, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add more debug infos when usable memory range changing

In the past, we did neglected some usable memory range changing infos. With those deubg code added, we can now catch them.

---
 kexec/arch/ppc64/crashdump-ppc64.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
kexec/arch/ppc64/crashdump-ppc64.c +12 -0
index d52b438..b5ec2c8 100644
@@ -465,12 +465,24 @@ void add_usable_mem_rgns(unsigned long long base, unsigned long long size)
 			if (base < ustart && end > uend) {
 				usablemem_rgns.ranges[i].start = base;
 				usablemem_rgns.ranges[i].end = end;
+#ifdef DEBUG
+				fprintf(stderr, "usable memory rgn %u: new base:%llx new size:%llx\n",
+					i, base, size);
+#endif
 				return;
 			} else if (base < ustart) {
 				usablemem_rgns.ranges[i].start = base;
+#ifdef DEBUG
+				fprintf(stderr, "usable memory rgn %u: new base:%llx new size:%llx",
+					i, base, usablemem_rgns.ranges[i].end - base);
+#endif
 				return;
 			} else if (end > uend){
 				usablemem_rgns.ranges[i].end = end;
+#ifdef DEBUG
+				fprintf(stderr, "usable memory rgn %u: new end:%llx, new size:%llx",
+					i, end, end - usablemem_rgns.ranges[i].start);
+#endif
 				return;
 			}
 		}
Signature · 7 lines
1.7.7.6


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec