qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH, RFC] Sparc: convert some debug printf statement


From: Artyom Tarasenko
Subject: Re: [Qemu-devel] [PATCH, RFC] Sparc: convert some debug printf statements to tracepoints
Date: Sun, 10 Oct 2010 19:37:29 +0200

On Sat, Oct 9, 2010 at 5:10 PM, Blue Swirl <address@hidden> wrote:
> Replace some debug printf statements with tracepoints.
>
> Signed-off-by: Blue Swirl <address@hidden>
> ---
> I think tracing way is more flexible than current conditional code. I
> remember wading through hundreds of megs of DPRINTF output looking for
> a clue about a specific event, so being able to control the trace
> dynamically is invaluable.
>
> Here's example simpletrace.py output:
> sparc64_translate 0.000 address=0x1fff0000040 paddr=0x1fff0000040
> vaddr=0x1fff0000000 mmu_idx=0x4 primary_context=0x0
> secondary_context=0x0
> sparc64_translate 24.017 address=0x1fff000bc50 paddr=0x1fff000bc50
> vaddr=0x1fff000a000 mmu_idx=0x4 primary_context=0x0
> secondary_context=0x0
> sparc64_translate 3.921 address=0x1fff000bc5c paddr=0x1fff000bc5c
> vaddr=0x1fff000a000 mmu_idx=0x2 primary_context=0x0
> secondary_context=0x0
> sparc64_translate 337.702 address=0x1fff000bf38 paddr=0x1fff000bf38
> vaddr=0x1fff000a000 mmu_idx=0x2 primary_context=0x0
> secondary_context=0x0
>
> There are problems #including "trace.h" from op_helper.c
> (qemu-common.h conflicts with dyngen-exec.h), otherwise this looks
> promising.
> ---
>  target-sparc/helper.c |   65 +++++++++++-------------------------------------
>  trace-events          |   10 +++++++
>  2 files changed, 25 insertions(+), 50 deletions(-)
>
> diff --git a/target-sparc/helper.c b/target-sparc/helper.c
> index aa1fd63..8078d92 100644
> --- a/target-sparc/helper.c
> +++ b/target-sparc/helper.c
> @@ -26,17 +26,11 @@
>  #include "cpu.h"
>  #include "exec-all.h"
>  #include "qemu-common.h"
> +#include "trace.h"
>
>  //#define DEBUG_MMU
>  //#define DEBUG_FEATURES
>
> -#ifdef DEBUG_MMU

wouldn't it be better to keep the #ifdefs? Don't mmu functions have a
strong impact on the performance?


-- 
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]