WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Add 'm' debug key to print free-memory info.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Add 'm' debug key to print free-memory info.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Feb 2006 11:28:10 +0000
Delivery-date: Tue, 28 Feb 2006 11:28:47 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID e77ea156075cd9c8eeb942efbf5a8cdb1c33eb09
# Parent  034af52f0df7d047d585a24233a1e19e0e2ae204
Add 'm' debug key to print free-memory info.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 034af52f0df7 -r e77ea156075c xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Tue Feb 28 09:18:34 2006
+++ b/xen/common/page_alloc.c   Tue Feb 28 10:07:18 2006
@@ -32,6 +32,7 @@
 #include <xen/softirq.h>
 #include <xen/shadow.h>
 #include <xen/domain_page.h>
+#include <xen/keyhandler.h>
 #include <asm/page.h>
 
 /*
@@ -662,6 +663,26 @@
 }
 
 
+static void pagealloc_keyhandler(unsigned char key)
+{
+    printk("Physical memory information:\n");
+    printk("    Xen heap: %lukB free\n"
+           "    DMA heap: %lukB free\n"
+           "    Dom heap: %lukB free\n",
+           avail[MEMZONE_XEN]<<(PAGE_SHIFT-10),
+           avail[MEMZONE_DMADOM]<<(PAGE_SHIFT-10),
+           avail[MEMZONE_DOM]<<(PAGE_SHIFT-10));
+}
+
+
+static __init int pagealloc_keyhandler_init(void)
+{
+    register_keyhandler('m', pagealloc_keyhandler, "memory info");
+    return 0;
+}
+__initcall(pagealloc_keyhandler_init);
+
+
 
 /*************************
  * PAGE SCRUBBING

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Add 'm' debug key to print free-memory info., Xen patchbot -unstable <=