qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH 5/6] trace-state: [simple] add "-trace event


From: Lluís
Subject: Re: [Qemu-devel] Re: [PATCH 5/6] trace-state: [simple] add "-trace events" argument to control initial state
Date: Wed, 06 Apr 2011 16:15:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Stefan Hajnoczi writes:

>> +            if (len > 1) {              /* skip empty lines */
>> +                line[len - 1] = '\0';
>> +                if (!st_change_trace_event_state(line, true)) {

> The build breaks when --enable-trace-backend != simple because this
> code is outside an #ifdef CONFIG_SIMPLE_TRACE.  Please add this:

> diff --git a/simpletrace.h b/simpletrace.h
> index 8d893bd..5d9d2ec 100644
> --- a/simpletrace.h
> +++ b/simpletrace.h
> @@ -43,6 +43,11 @@ static inline bool st_init(const char *file)
>  {
>      return true;
>  }
> +
> +static bool st_change_trace_event_state(const char *tname, bool tstate)
> +{
> +    return true;
> +}
>  #endif /* !CONFIG_SIMPLE_TRACE */

>  #endif /* SIMPLETRACE_H */

Hmmm... why don't simply conditionally call st_init (put it into an
#ifdef) and remove the "#else" in simpletrace.h.

I've looked at it and it's not called from anywhere else.

This also reminds me that I didn't see any "-trace" option parsing in
the OS-specific frontends (at least in linux-user).


Lluis

--
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



reply via email to

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