qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Lluís <xscript@gmx.net>
Cc: qemu-devel@nongnu.org, chouteau@adacore.com
Subject: Re: [Qemu-devel] [PATCH v7 08/13] trace-state: always compile support for controlling and querying trace event states
Date: Wed, 31 Aug 2011 11:10:45 +0100	[thread overview]
Message-ID: <20110831101045.GC11497@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <20110825191824.1413.16777.stgit@ginnungagap.bsc.es>

On Thu, Aug 25, 2011 at 09:18:24PM +0200, Lluís wrote:
> The current interface is generic for this small set of operations, and thus
> other backends can easily modify the "trace/control.c" file to add their own
> implementation.
> 
> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
> ---
>  docs/tracing.txt |   39 +++++++++++++++++++++------------------
>  hmp-commands.hx  |    7 +++++--
>  monitor.c        |    9 +++++----
>  3 files changed, 31 insertions(+), 24 deletions(-)
> 
> diff --git a/docs/tracing.txt b/docs/tracing.txt
> index 1ad106a..017ff59 100644
> --- a/docs/tracing.txt
> +++ b/docs/tracing.txt
> @@ -108,6 +108,27 @@ portability macros, ensure they are preceded and followed by double quotes:
>     of trace events.  Marking trace events disabled by default saves the user
>     from having to manually disable noisy trace events.
>  
> +== Generic interface and monitor commands ==
> +
> +You can programmatically query and control the dynamic state of trace events
> +through a backend-agnostic interface:
> +
> +* trace_print_events
> +
> +* trace_event_set_state
> +
> +Note that some of the backends do not provide and implementation for this

s/and/an/

> +interface, in which case QEMU will just print a warning.
> +
> +This functionality is also provided through monitor commands:
> +
> +* info trace-events
> +  View available trace events and their state.  State 1 means enabled, state 0
> +  means disabled.
> +
> +* trace-event NAME on|off
> +  Enable/disable a given trace event.
> +
>  == Trace backends ==
>  
>  The "tracetool" script automates tedious trace event code generation and also
> @@ -157,27 +178,9 @@ unless you have specific needs for more advanced backends.
>    flushed and emptied.  This means the 'info trace' will display few or no
>    entries if the buffer has just been flushed.
>  
> -* info trace-events
> -  View available trace events and their state.  State 1 means enabled, state 0
> -  means disabled.
> -
> -* trace-event NAME on|off
> -  Enable/disable a given trace event.
> -
>  * trace-file on|off|flush|set <path>
>    Enable/disable/flush the trace file or set the trace file name.
>  
> -==== Enabling/disabling trace events programmatically ====
> -
> -The st_change_trace_event_state() function can be used to enable or disable trace
> -events at runtime inside QEMU:
> -
> -    #include "trace.h"
> -    
> -    st_change_trace_event_state("virtio_irq", true); /* enable */
> -    [...]
> -    st_change_trace_event_state("virtio_irq", false); /* disable */
> -

Please update and move this example to where trace_event_set_state() is
documented.  Having an example makes it clear what this function does.

Stefan

  reply	other threads:[~2011-08-31 10:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 19:17 [Qemu-devel] [PATCH v7 00/13] trace-state: make the behaviour of "disable" consistent across all backends Lluís
2011-08-25 19:17 ` [Qemu-devel] [PATCH v7 01/13] [simple] Include qemu-timer-common.o in trace-obj-y Lluís
2011-08-25 19:17 ` [Qemu-devel] [PATCH v7 02/13] trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_* Lluís
2011-08-25 19:17 ` [Qemu-devel] [PATCH v7 03/13] trace: [make] replace 'ifeq' with values in CONFIG_TRACE_* Lluís
2011-08-31 12:15   ` Stefan Hajnoczi
2011-08-25 19:17 ` [Qemu-devel] [PATCH v7 04/13] trace: move backend-specific code into the trace/ directory Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 05/13] trace: avoid conditional code compilation during option parsing Lluís
2011-08-31  9:53   ` Stefan Hajnoczi
2011-08-31 11:43   ` Stefan Hajnoczi
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 06/13] trace: generalize the "property" concept in the trace-events file Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 07/13] trace-state: separate trace event control and query routines from the simple backend Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 08/13] trace-state: always compile support for controlling and querying trace event states Lluís
2011-08-31 10:10   ` Stefan Hajnoczi [this message]
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 09/13] trace-state: add "-trace events" argument to control initial state Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 10/13] trace-state: always use the "nop" backend on events with the "disable" keyword Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 11/13] trace-state: [simple] disable all trace points by default Lluís
2011-08-31 10:21   ` Stefan Hajnoczi
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 12/13] trace-state: [stderr] add support for dynamically enabling/disabling events Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 13/13] trace: enable all events Lluís
2011-08-31  9:54 ` [Qemu-devel] [PATCH v7 00/13] trace-state: make the behaviour of "disable" consistent across all backends Stefan Hajnoczi
2011-08-31 12:17 ` Stefan Hajnoczi
2011-08-31 16:52   ` Lluís

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110831101045.GC11497@stefanha-thinkpad.localdomain \
    --to=stefanha@gmail.com \
    --cc=chouteau@adacore.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xscript@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).