qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Tracing][PATCH v2] Add options to specify trace file n


From: malc
Subject: Re: [Qemu-devel] [Tracing][PATCH v2] Add options to specify trace file name at startup and runtime.
Date: Wed, 4 Aug 2010 13:30:42 +0400 (MSD)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Wed, 4 Aug 2010, Prerna Saxena wrote:

> This patch adds an optional command line switch '-trace' to specify the 
> filename to write traces to, when qemu starts.
> Eg, If compiled with the 'simple' trace backend,
> address@hidden qemu -trace FILENAME IMAGE
> Allows the binary traces to be written to FILENAME instead of the option 
> set at config-time. 
> 
> Also, this adds monitor sub-command 'set' to trace-file commands to 
> dynamically change trace log file at runtime. 
> Eg,
> (qemu)trace-file set FILENAME
> This allows one to set trace outputs to FILENAME from the default 
> specified at startup.
> 
> Changelog from v1 :
> - Cleanups.

[..snip..]

> +    st_set_trace_file_enabled(false);
>  
> -    if (asprintf(&filename, CONFIG_TRACE_FILE, getpid()) < 0) {
> -        return false;
> +    free(trace_file_name);
> +
> +    if (!file) {
> +        if (asprintf(&trace_file_name, CONFIG_TRACE_FILE, getpid()) < 0) {
> +            trace_file_name = NULL;
> +         return false;

Tab here.

> +        } 
> +    } else {
> +        if (asprintf(&trace_file_name, "%s", file) < 0) {
> +            trace_file_name = NULL;
> +            return false;
> +        }
>      }
>  
[..snip..]

-- 
mailto:address@hidden



reply via email to

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