summaryrefslogtreecommitdiffstats
path: root/docs/tracing.txt
Commit message (Collapse)AuthorAgeFilesLines
* trace: Remove "info trace" from documentsLiming Wang2012-11-161-9/+0
| | | | | | | | | commit 88affa1c monitor: remove unused do_info_trace has removed "info trace" function from monitor, so remove it from documents. Signed-off-by: Liming Wang <walimisdev@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* trace: document '-' syntax for disabling eventsStefan Hajnoczi2012-11-161-0/+4
| | | | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* docs: correct ./configure line in tracing.txtJun Koi2012-03-121-1/+1
| | | | | | | This patch corrects the configure's trace option in docs/tracing.txt. Signed-off-by: Jun Koi <junkoi2004@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* trace: Provide a per-event status define for conditional compilationLluís Vilanova2012-03-121-6/+40
| | | | | | | | | | | | | | | Adds a 'TRACE_${NAME}_ENABLED' preprocessor define for each tracing event in "trace.h". This lets the user conditionally compile code with a relatively high execution cost that is only necessary when producing the tracing information for an event that is enabled. Note that events using this define will probably have the "disable" property by default, in order to avoid such costs on regular builds. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* trace: Add wildcard trace event supportMark Wu2011-11-011-1/+8
| | | | | | | | | | | A basic wildcard matching is supported in both the monitor command "trace-event" and the events list file. That means you can enable/disable the events having a common prefix in a batch. For example, virtio-blk trace events could be enabled using: trace-event virtio_blk_* on Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* trace: Update docs to use example events that existLluís Vilanova2011-09-211-7/+9
| | | | | | | | The events 'qemu_malloc' and 'qemu_free' used in the examples no longer exist, so use 'qemu_vmalloc' and 'qemu_vfree' instead. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* trace: allow trace events with string argumentsStefan Hajnoczi2011-09-211-5/+3
| | | | | | | | | String arguments are useful for producing human-readable traces without post-processing (e.g. stderr backend). Although the simple backend cannot handles strings all others can. Strings should be allowed and the simple backend can be extended to support them. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* trace: allow PRI*64 at beginning and ending of format stringStefan Hajnoczi2011-09-171-4/+1
| | | | | | | | | | | | | | | | | | | The tracetool parser only picks up PRI*64 and other format string macros when enclosed between double quoted strings. Lift this restriction by extracting everything after the closing ')' as the format string: cpu_set_apic_base(uint64_t val) "%016"PRIx64 ^^ ^^ One trick here: it turns out that backslashes in the format string like "\n" were being interpreted by echo(1). Fix this by using the POSIX printf(1) command instead. Although it normally does not make sense to include backslashes in trace event format strings, an injected newline causes tracetool to emit a broken header file and I want to eliminate cases where broken output is emitted, even if the input was bad. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* trace: [stderr] add support for dynamically enabling/disabling eventsLluís2011-09-011-5/+0
| | | | | | | | Uses the generic interface provided in "trace/control.h" in order to provide a programmatic interface as well as command line and monitor controls. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
* trace: [simple] disable all trace points by defaultLluís2011-09-011-3/+8
| | | | | | | | Note that this refers to the backend-specific state (whether the output must be generated), not the event "disabled" property (which always uses the "nop" backend). Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
* trace: always use the "nop" backend on events with the "disable" keywordLluís2011-09-011-10/+15
| | | | | | | Any event with the keyword/property "disable" generates an empty trace event using the "nop" backend, regardless of the current backend. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
* trace: add "-trace events" argument to control initial stateLluís2011-09-011-0/+4
| | | | | | | | | | | The "-trace events" argument can be used to provide a file with a list of trace event names that will be enabled prior to starting execution, thus providing early tracing. This saves the user from manually toggling event states through the monitor interface or whichever backend-specific interface. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
* trace: always compile support for controlling and querying trace event statesLluís2011-09-011-18/+30
| | | | | | | | 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>
* trace: generalize the "property" concept in the trace-events fileLluís2011-09-011-2/+2
| | | | | | | | | | This adds/modifies the following functions: * get_name: Get _only_ the event name * has_property: Return whether an event has a property (keyword before the event name) Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
* docs/tracing.txt: minor documentation fixesLluís2011-04-261-9/+9
| | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* docs: Trace events must not expect pointer dereferencingStefan Hajnoczi2011-04-261-0/+5
| | | | Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* simpletrace: Thread-safe tracingStefan Hajnoczi2011-03-071-5/+0
| | | | | | | | | | | | | | | | | | Trace events outside the global mutex cannot be used with the simple trace backend since it is not thread-safe. There is no check to prevent them being enabled so people sometimes learn this the hard way. This patch restructures the simple trace backend with a ring buffer suitable for multiple concurrent writers. A writeout thread empties the trace buffer when threshold fill levels are reached. Should the writeout thread be unable to keep up with trace generation, records will simply be dropped. Each time events are dropped a special record is written to the trace file indicating how many events were dropped. The event ID is 0xfffffffffffffffe and its signature is dropped(uint32_t count). Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* docs: Update stderr and simple backend, add systemtap backendStefan Hajnoczi2011-03-061-4/+26
| | | | | | | | | | | | | | The following additions to the tracing documentation are included: 1. Move "stderr" backend documentation to top-level and out of "simple" backend. Include hints on when this backend is useful. 2. Document the "simple" backend thread-safety limitation. 3. Document the "dtrace" backend for SystemTap. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* New trace-event backend: stderrFabien Chouteau2011-01-291-0/+5
| | | | | | | | | | | This backend sends trace events to standard error output during the emulation. Also add a "--list-backends" option to tracetool, so configure script can display the list of available backends. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* trace: Format strings must begin/end with double quotesStefan Hajnoczi2010-10-201-1/+4
| | | | | | | | | Document the restriction that format strings must begin and end with double quotes. This is for easy parsing since we don't run cpp over trace-events. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* trace: Use portable format stringsStefan Hajnoczi2010-10-091-0/+4
| | | | | | | | | It is not portable to use "%ld" for int64_t because int64_t may have type long on 64-bit platforms and long long on 32-bit platforms. Use the standard library PRId64 macros to keep format strings portable. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* trace: Add user documentationStefan Hajnoczi2010-09-091-0/+177
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud