All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qcow2: use always stderr for debugging
@ 2011-08-25  7:23 Frediano Ziglio
  2011-08-25 13:22 ` Kevin Wolf
  2011-08-25 14:34 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Frediano Ziglio @ 2011-08-25  7:23 UTC (permalink / raw)
  To: kwolf; +Cc: qemu-devel, Frediano Ziglio

let all DEBUG_ALLOC2 printf goes to stderr

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
---
 block/qcow2-cluster.c  |    2 +-
 block/qcow2-refcount.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 9269dda..9034840 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -53,7 +53,7 @@ int qcow2_grow_l1_table(BlockDriverState *bs, int min_size, bool exact_size)
     }
 
 #ifdef DEBUG_ALLOC2
-    printf("grow l1_table from %d to %d\n", s->l1_size, new_l1_size);
+    fprintf(stderr, "grow l1_table from %d to %d\n", s->l1_size, new_l1_size);
 #endif
 
     new_l1_size2 = sizeof(uint64_t) * new_l1_size;
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 2a915be..fbf28da 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -422,7 +422,7 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,
     int ret;
 
 #ifdef DEBUG_ALLOC2
-    printf("update_refcount: offset=%" PRId64 " size=%" PRId64 " addend=%d\n",
+    fprintf(stderr, "update_refcount: offset=%" PRId64 " size=%" PRId64 " addend=%d\n",
            offset, length, addend);
 #endif
     if (length < 0) {
@@ -556,7 +556,7 @@ retry:
         }
     }
 #ifdef DEBUG_ALLOC2
-    printf("alloc_clusters: size=%" PRId64 " -> %" PRId64 "\n",
+    fprintf(stderr, "alloc_clusters: size=%" PRId64 " -> %" PRId64 "\n",
             size,
             (s->free_cluster_index - nb_clusters) << s->cluster_bits);
 #endif
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] qcow2: use always stderr for debugging
  2011-08-25  7:23 [Qemu-devel] [PATCH] qcow2: use always stderr for debugging Frediano Ziglio
@ 2011-08-25 13:22 ` Kevin Wolf
  2011-08-25 14:34 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2011-08-25 13:22 UTC (permalink / raw)
  To: Frediano Ziglio; +Cc: qemu-devel

Am 25.08.2011 09:23, schrieb Frediano Ziglio:
> let all DEBUG_ALLOC2 printf goes to stderr
> 
> Signed-off-by: Frediano Ziglio <freddy77@gmail.com>

Thanks, applied to the block branch.

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] qcow2: use always stderr for debugging
  2011-08-25  7:23 [Qemu-devel] [PATCH] qcow2: use always stderr for debugging Frediano Ziglio
  2011-08-25 13:22 ` Kevin Wolf
@ 2011-08-25 14:34 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2011-08-25 14:34 UTC (permalink / raw)
  To: Frediano Ziglio; +Cc: kwolf, qemu-devel

On 08/25/2011 09:23 AM, Frediano Ziglio wrote:
> let all DEBUG_ALLOC2 printf goes to stderr
>
> Signed-off-by: Frediano Ziglio<freddy77@gmail.com>
> ---
>   block/qcow2-cluster.c  |    2 +-
>   block/qcow2-refcount.c |    4 ++--
>   2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
> index 9269dda..9034840 100644
> --- a/block/qcow2-cluster.c
> +++ b/block/qcow2-cluster.c
> @@ -53,7 +53,7 @@ int qcow2_grow_l1_table(BlockDriverState *bs, int min_size, bool exact_size)
>       }
>
>   #ifdef DEBUG_ALLOC2
> -    printf("grow l1_table from %d to %d\n", s->l1_size, new_l1_size);
> +    fprintf(stderr, "grow l1_table from %d to %d\n", s->l1_size, new_l1_size);
>   #endif
>
>       new_l1_size2 = sizeof(uint64_t) * new_l1_size;
> diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
> index 2a915be..fbf28da 100644
> --- a/block/qcow2-refcount.c
> +++ b/block/qcow2-refcount.c
> @@ -422,7 +422,7 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,
>       int ret;
>
>   #ifdef DEBUG_ALLOC2
> -    printf("update_refcount: offset=%" PRId64 " size=%" PRId64 " addend=%d\n",
> +    fprintf(stderr, "update_refcount: offset=%" PRId64 " size=%" PRId64 " addend=%d\n",
>              offset, length, addend);
>   #endif
>       if (length<  0) {
> @@ -556,7 +556,7 @@ retry:
>           }
>       }
>   #ifdef DEBUG_ALLOC2
> -    printf("alloc_clusters: size=%" PRId64 " ->  %" PRId64 "\n",
> +    fprintf(stderr, "alloc_clusters: size=%" PRId64 " ->  %" PRId64 "\n",
>               size,
>               (s->free_cluster_index - nb_clusters)<<  s->cluster_bits);
>   #endif

Adding trace events would be even better, no?

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-25 14:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25  7:23 [Qemu-devel] [PATCH] qcow2: use always stderr for debugging Frediano Ziglio
2011-08-25 13:22 ` Kevin Wolf
2011-08-25 14:34 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.