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

[Xen-devel] [PATCH 3/6] log level DPRINTK common code



This updates all the DPRINTK common code to use the log levels.

Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
diff -r cdb380430a3c xen/common/event_channel.c
--- a/xen/common/event_channel.c        Thu Oct 26 22:19:04 2006 -0400
+++ b/xen/common/event_channel.c        Thu Oct 26 22:33:58 2006 -0400
@@ -40,7 +40,8 @@
 
 #define ERROR_EXIT(_errno)                                          \
     do {                                                            \
-        DPRINTK("EVTCHNOP failure: domain %d, error %d, line %d\n", \
+        DPRINTK(XENLOG_G_WARNING                                    \
+                "EVTCHNOP failure: domain %d, error %d, line %d\n", \
                 current->domain->domain_id, (_errno), __LINE__);    \
         rc = (_errno);                                              \
         goto out;                                                   \
diff -r cdb380430a3c xen/common/grant_table.c
--- a/xen/common/grant_table.c  Thu Oct 26 22:19:04 2006 -0400
+++ b/xen/common/grant_table.c  Thu Oct 26 22:33:58 2006 -0400
@@ -47,7 +47,7 @@ union grant_combo {
 
 #define PIN_FAIL(_lbl, _rc, _f, _a...)          \
     do {                                        \
-        DPRINTK( _f, ## _a );                   \
+        DPRINTK( XENLOG_G_WARNING _f, ## _a );  \
         rc = (_rc);                             \
         goto _lbl;                              \
     } while ( 0 )
@@ -109,7 +109,8 @@ __gnttab_map_grant_ref(
     if ( unlikely(op->ref >= NR_GRANT_ENTRIES) ||
          unlikely((op->flags & (GNTMAP_device_map|GNTMAP_host_map)) == 0) )
     {
-        DPRINTK("Bad ref (%d) or flags (%x).\n", op->ref, op->flags);
+        DPRINTK(XENLOG_G_INFO "Bad ref (%d) or flags (%x).\n",
+                op->ref, op->flags);
         op->status = GNTST_bad_gntref;
         return;
     }
@@ -124,7 +125,7 @@ __gnttab_map_grant_ref(
     {
         if ( rd != NULL )
             put_domain(rd);
-        DPRINTK("Could not find domain %d\n", op->dom);
+        DPRINTK(XENLOG_G_INFO "Could not find domain %d\n", op->dom);
         op->status = GNTST_bad_domain;
         return;
     }
@@ -139,7 +140,7 @@ __gnttab_map_grant_ref(
         if ( (lgt->maptrack_limit << 1) > MAPTRACK_MAX_ENTRIES )
         {
             put_domain(rd);
-            DPRINTK("Maptrack table is at maximum size.\n");
+            DPRINTK(XENLOG_G_INFO "Maptrack table is at maximum size.\n");
             op->status = GNTST_no_device_space;
             return;
         }
@@ -149,7 +150,7 @@ __gnttab_map_grant_ref(
         if ( new_mt == NULL )
         {
             put_domain(rd);
-            DPRINTK("No more map handles available.\n");
+            DPRINTK(XENLOG_G_INFO "No more map handles available.\n");
             op->status = GNTST_no_device_space;
             return;
         }
@@ -166,7 +167,7 @@ __gnttab_map_grant_ref(
         lgt->maptrack_order   += 1;
         lgt->maptrack_limit  <<= 1;
 
-        DPRINTK("Doubled maptrack size\n");
+        DPRINTK(XENLOG_G_INFO "Doubled maptrack size\n");
         handle = get_maptrack_handle(ld->grant_table);
     }
 
@@ -353,7 +354,7 @@ __gnttab_unmap_grant_ref(
     if ( unlikely(op->handle >= ld->grant_table->maptrack_limit) ||
          unlikely(!map->flags) )
     {
-        DPRINTK("Bad handle (%d).\n", op->handle);
+        DPRINTK(XENLOG_G_INFO "Bad handle (%d).\n", op->handle);
         op->status = GNTST_bad_handle;
         return;
     }
@@ -366,7 +367,7 @@ __gnttab_unmap_grant_ref(
     {
         if ( rd != NULL )
             put_domain(rd);
-        DPRINTK("Could not find domain %d\n", dom);
+        DPRINTK(XENLOG_G_INFO "Could not find domain %d\n", dom);
         op->status = GNTST_bad_domain;
         return;
     }
@@ -486,13 +487,14 @@ gnttab_setup_table(
 
     if ( unlikely(copy_from_guest(&op, uop, 1) != 0) )
     {
-        DPRINTK("Fault while reading gnttab_setup_table_t.\n");
+        DPRINTK(XENLOG_G_INFO "Fault while reading gnttab_setup_table_t.\n");
         return -EFAULT;
     }
 
     if ( unlikely(op.nr_frames > NR_GRANT_FRAMES) )
     {
-        DPRINTK("Xen only supports up to %d grant-table frames per domain.\n",
+        DPRINTK(XENLOG_G_INFO "Xen only supports up to %d grant-table frames"
+                " per domain.\n",
                 NR_GRANT_FRAMES);
         op.status = GNTST_general_error;
         goto out;
@@ -511,7 +513,7 @@ gnttab_setup_table(
 
     if ( unlikely((d = find_domain_by_id(dom)) == NULL) )
     {
-        DPRINTK("Bad domid %d.\n", dom);
+        DPRINTK(XENLOG_G_INFO "Bad domid %d.\n", dom);
         op.status = GNTST_bad_domain;
         goto out;
     }
@@ -549,7 +551,7 @@ gnttab_prepare_for_transfer(
     if ( unlikely((rgt = rd->grant_table) == NULL) ||
          unlikely(ref >= NR_GRANT_ENTRIES) )
     {
-        DPRINTK("Dom %d has no g.t., or ref is bad (%d).\n",
+        DPRINTK(XENLOG_G_INFO "Dom %d has no g.t., or ref is bad (%d).\n",
                 rd->domain_id, ref);
         return 0;
     }
@@ -565,7 +567,8 @@ gnttab_prepare_for_transfer(
         if ( unlikely(scombo.shorts.flags != GTF_accept_transfer) ||
              unlikely(scombo.shorts.domid != ld->domain_id) )
         {
-            DPRINTK("Bad flags (%x) or dom (%d). (NB. expected dom %d)\n",
+            DPRINTK(XENLOG_G_INFO "Bad flags (%x) or dom (%d). "
+                    "(NB. expected dom %d)\n",
                     scombo.shorts.flags, scombo.shorts.domid,
                     ld->domain_id);
             goto fail;
@@ -581,7 +584,7 @@ gnttab_prepare_for_transfer(
 
         if ( retries++ == 4 )
         {
-            DPRINTK("Shared grant entry is unstable.\n");
+            DPRINTK(XENLOG_G_WARNING "Shared grant entry is unstable.\n");
             goto fail;
         }
 
@@ -613,7 +616,8 @@ gnttab_transfer(
         /* Read from caller address space. */
         if ( unlikely(__copy_from_guest_offset(&gop, uop, i, 1)) )
         {
-            DPRINTK("gnttab_transfer: error reading req %d/%d\n", i, count);
+            DPRINTK(XENLOG_G_INFO "gnttab_transfer: error reading req %d/%d\n",
+                    i, count);
             return -EFAULT;
         }
 
@@ -622,7 +626,7 @@ gnttab_transfer(
         /* Check the passed page frame for basic validity. */
         if ( unlikely(!mfn_valid(mfn)) )
         { 
-            DPRINTK("gnttab_transfer: out-of-range %lx\n",
+            DPRINTK(XENLOG_G_INFO "gnttab_transfer: out-of-range %lx\n",
                     (unsigned long)gop.mfn);
             gop.status = GNTST_bad_page;
             goto copyback;
@@ -631,7 +635,7 @@ gnttab_transfer(
         page = mfn_to_page(mfn);
         if ( unlikely(IS_XEN_HEAP_FRAME(page)) )
         { 
-            DPRINTK("gnttab_transfer: xen frame %lx\n",
+            DPRINTK(XENLOG_G_INFO "gnttab_transfer: xen frame %lx\n",
                     (unsigned long)gop.mfn);
             gop.status = GNTST_bad_page;
             goto copyback;
@@ -646,7 +650,8 @@ gnttab_transfer(
         /* Find the target domain. */
         if ( unlikely((e = find_domain_by_id(gop.domid)) == NULL) )
         {
-            DPRINTK("gnttab_transfer: can't find domain %d\n", gop.domid);
+            DPRINTK(XENLOG_G_INFO "gnttab_transfer: can't find domain %d\n",
+                    gop.domid);
             page->count_info &= ~(PGC_count_mask|PGC_allocated);
             free_domheap_page(page);
             gop.status = GNTST_bad_domain;
@@ -665,7 +670,8 @@ gnttab_transfer(
              unlikely(!gnttab_prepare_for_transfer(e, d, gop.ref)) )
         {
             if ( !test_bit(_DOMF_dying, &e->domain_flags) )
-                DPRINTK("gnttab_transfer: Transferee has no reservation "
+                DPRINTK(XENLOG_G_INFO "gnttab_transfer: "
+                        "Transferee has no reservation "
                         "headroom (%d,%d) or provided a bad grant ref (%08x) "
                         "or is dying (%lx)\n",
                         e->tot_pages, e->max_pages, gop.ref, e->domain_flags);
@@ -701,7 +707,8 @@ gnttab_transfer(
     copyback:
         if ( unlikely(__copy_to_guest_offset(uop, i, &gop, 1)) )
         {
-            DPRINTK("gnttab_transfer: error writing resp %d/%d\n", i, count);
+            DPRINTK(XENLOG_G_INFO "gnttab_transfer: error writing resp 
%d/%d\n",
+                    i, count);
             return -EFAULT;
         }
     }
@@ -1090,7 +1097,8 @@ gnttab_release_mappings(
 
         ref = map->ref;
 
-        DPRINTK("Grant release (%hu) ref:(%hu) flags:(%x) dom:(%hu)\n",
+        DPRINTK(XENLOG_G_INFO "Grant release (%hu) ref:(%hu) "
+                "flags:(%x) dom:(%hu)\n",
                 handle, ref, map->flags, map->domid);
 
         rd = find_domain_by_id(map->domid);
diff -r cdb380430a3c xen/common/memory.c
--- a/xen/common/memory.c       Thu Oct 26 22:19:04 2006 -0400
+++ b/xen/common/memory.c       Thu Oct 26 22:33:58 2006 -0400
@@ -63,7 +63,7 @@ increase_reservation(
         if ( unlikely((page = __alloc_domheap_pages( d, cpu, 
             extent_order, memflags )) == NULL) ) 
         {
-            DPRINTK("Could not allocate order=%d extent: "
+            DPRINTK(XENLOG_G_INFO "Could not allocate order=%d extent: "
                     "id=%d memflags=%x (%ld of %d)\n",
                     extent_order, d->domain_id, memflags, i, nr_extents);
             return i;
@@ -118,7 +118,7 @@ populate_physmap(
         if ( unlikely((page = __alloc_domheap_pages( d, cpu, 
             extent_order, memflags )) == NULL) ) 
         {
-            DPRINTK("Could not allocate order=%d extent: "
+            DPRINTK(XENLOG_G_INFO "Could not allocate order=%d extent: "
                     "id=%d memflags=%x (%ld of %d)\n",
                     extent_order, d->domain_id, memflags, i, nr_extents);
             goto out;
@@ -157,7 +157,7 @@ guest_remove_page(
     mfn = gmfn_to_mfn(d, gmfn);
     if ( unlikely(!mfn_valid(mfn)) )
     {
-        DPRINTK("Domain %u page number %lx invalid\n",
+        DPRINTK(XENLOG_G_INFO "Domain %u page number %lx invalid\n",
                 d->domain_id, gmfn);
         return 0;
     }
@@ -165,7 +165,7 @@ guest_remove_page(
     page = mfn_to_page(mfn);
     if ( unlikely(!get_page(page, d)) )
     {
-        DPRINTK("Bad page free for domain %u\n", d->domain_id);
+        DPRINTK(XENLOG_G_INFO "Bad page free for domain %u\n", d->domain_id);
         return 0;
     }
 
@@ -178,7 +178,7 @@ guest_remove_page(
     if ( unlikely(!page_is_removable(page)) )
     {
         /* We'll make this a guest-visible error in future, so take heed! */
-        DPRINTK("Dom%d freeing in-use page %lx (pseudophys %lx):"
+        DPRINTK(XENLOG_G_INFO "Dom%d freeing in-use page %lx (pseudophys %lx):"
                 " count=%lx type=%lx\n",
                 d->domain_id, mfn, get_gpfn_from_mfn(mfn),
                 (unsigned long)page->count_info, page->u.inuse.type_info);
diff -r cdb380430a3c xen/common/multicall.c
--- a/xen/common/multicall.c    Thu Oct 26 22:19:04 2006 -0400
+++ b/xen/common/multicall.c    Thu Oct 26 22:33:58 2006 -0400
@@ -24,7 +24,7 @@ do_multicall(
 
     if ( unlikely(__test_and_set_bit(_MCSF_in_multicall, &mcs->flags)) )
     {
-        DPRINTK("Multicall reentry is disallowed.\n");
+        DPRINTK(XENLOG_G_INFO "Multicall reentry is disallowed.\n");
         return -EINVAL;
     }
 
diff -r cdb380430a3c xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Thu Oct 26 22:19:04 2006 -0400
+++ b/xen/common/page_alloc.c   Thu Oct 26 22:33:58 2006 -0400
@@ -599,7 +599,8 @@ int assign_pages(
 
     if ( unlikely(test_bit(_DOMF_dying, &d->domain_flags)) )
     {
-        DPRINTK("Cannot assign page to domain%d -- dying.\n", d->domain_id);
+        DPRINTK(XENLOG_G_INFO "Cannot assign page to domain%d -- dying.\n",
+                d->domain_id);
         goto fail;
     }
 
@@ -607,7 +608,7 @@ int assign_pages(
     {
         if ( unlikely((d->tot_pages + (1 << order)) > d->max_pages) )
         {
-            DPRINTK("Over-allocation for domain %u: %u > %u\n",
+            DPRINTK(XENLOG_G_INFO "Over-allocation for domain %u: %u > %u\n",
                     d->domain_id, d->tot_pages + (1 << order), d->max_pages);
             goto fail;
         }
diff -r cdb380430a3c xen/common/schedule.c
--- a/xen/common/schedule.c     Thu Oct 26 22:19:04 2006 -0400
+++ b/xen/common/schedule.c     Thu Oct 26 22:33:58 2006 -0400
@@ -468,7 +468,7 @@ long do_set_timer_op(s_time_t timeout)
          * timeout in this case can burn a lot of CPU. We therefore go for a
          * reasonable middleground of triggering a timer event in 100ms.
          */
-        DPRINTK("Warning: huge timeout set by domain %d (vcpu %d):"
+        DPRINTK(XENLOG_G_INFO "Warning: huge timeout set by domain %d (vcpu 
%d):"
                 " %"PRIx64"\n",
                 v->domain->domain_id, v->vcpu_id, (uint64_t)timeout);
         set_timer(&v->timer, NOW() + MILLISECS(100));
diff -r cdb380430a3c xen/common/trace.c
--- a/xen/common/trace.c        Thu Oct 26 22:19:04 2006 -0400
+++ b/xen/common/trace.c        Thu Oct 26 22:33:58 2006 -0400
@@ -131,7 +131,7 @@ static int tb_set_size(int size)
      */
     if ( (opt_tbuf_size != 0) || (size <= 0) )
     {
-        DPRINTK("tb_set_size from %d to %d not implemented\n",
+        DPRINTK(XENLOG_G_INFO "tb_set_size from %d to %d not implemented\n",
                 opt_tbuf_size, size);
         return -EINVAL;
     }
_______________________________________________
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®.