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

[Xen-devel] [PATCH 03/17] xenpaging: print DPRINTF ouput if XENPAGING_DEBUG is in environment


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Mon, 06 Dec 2010 21:59:10 +0100
  • Delivery-date: Mon, 06 Dec 2010 13:10:38 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

No DPRINTF output is logged because the default loglevel is to low in
libxc. Recognize the XENPAGING_DEBUG environment variable to change the
default loglevel at runtime.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

---
 tools/xenpaging/xenpaging.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

--- xen-unstable.hg-4.1.22459.orig/tools/xenpaging/xenpaging.c
+++ xen-unstable.hg-4.1.22459/tools/xenpaging/xenpaging.c
@@ -39,12 +39,6 @@
 #include "policy.h"
 #include "xenpaging.h"
 
-
-#if 0
-#undef DPRINTF
-#define DPRINTF(...) ((void)0)
-#endif
-
 static char filename[80];
 static int interrupted;
 static void close_handler(int sig)
@@ -83,9 +77,12 @@ xenpaging_t *xenpaging_init(xc_interface
 {
     xenpaging_t *paging;
     xc_interface *xch;
+    xentoollog_logger *dbg = NULL;
     int rc;
 
-    xch = xc_interface_open(NULL, NULL, 0);
+    if ( getenv("XENPAGING_DEBUG") )
+        dbg = (xentoollog_logger *)xtl_createlogger_stdiostream(stderr, 
XTL_DEBUG, 0);
+    xch = xc_interface_open(dbg, NULL, 0);
     if ( !xch )
         goto err_iface;
 


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.