[PATCH] Add more debug infos when usable memory range changing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(-)

diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c
index d52b438..b5ec2c8 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.c
+++ b/kexec/arch/ppc64/crashdump-ppc64.c
@@ -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;
 			}
 		}
-- 
1.7.7.6




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux