1. 23 Feb, 2016 1 commit
  2. 03 Feb, 2016 1 commit
  3. 09 Jun, 2014 1 commit
    • Lluís Vilanova's avatar
      trace: Multi-backend tracing · 5b808275
      Lluís Vilanova authored
      Adds support to compile QEMU with multiple tracing backends at the same time.
      For example, you can compile QEMU with:
        $ ./configure --enable-trace-backends=ftrace,dtrace
      Where 'ftrace' can be handy for having an in-flight record of events, and 'dtrace' can be later used to extract more information from the system.
      This patch allows having both available without recompiling QEMU.
      Signed-off-by: 's avatarLluís Vilanova <vilanova@ac.upc.edu>
      Signed-off-by: 's avatarStefan Hajnoczi <stefanha@redhat.com>
  4. 28 Mar, 2013 1 commit
  5. 14 Aug, 2012 1 commit
  6. 19 Jul, 2012 2 commits
  7. 01 Sep, 2011 4 commits
  8. 15 Mar, 2011 1 commit
  9. 07 Mar, 2011 1 commit
    • Stefan Hajnoczi's avatar
      simpletrace: Thread-safe tracing · 0b5538c3
      Stefan Hajnoczi authored
      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: 's avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
  10. 21 Nov, 2010 1 commit
  11. 13 Oct, 2010 1 commit
  12. 09 Sep, 2010 3 commits
    • Stefan Hajnoczi's avatar
      trace: Add trace-file command to open/close/flush trace file · c5ceb523
      Stefan Hajnoczi authored
      This patch adds the trace-file command:
        trace-file [on|off|flush]
        Open, close, or flush the trace file.  If no argument is given,
        the status of the trace file is displayed.
      The trace file is turned on by default but is only written out when the
      trace buffer becomes full.  The flush operation can be used to force
      write out at any time.
      Turning off the trace file does not change the state of trace events;
      tracing will continue to the trace buffer.  When the trace file is off,
      use "info trace" to display the contents of the trace buffer in memory.
      Signed-off-by: 's avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      This commit also contains the trace-file sub-command from the following
      commit 5ce8d1a957afae2c52ad748944ce72848ccf57bd
      Author: Prerna Saxena <prerna@linux.vnet.ibm.com>
      Date:   Wed Aug 4 16:23:54 2010 +0530
          trace: Add options to specify trace file name at startup and runtime
          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,
          [temp@system]$ 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.
          (qemu)trace-file set FILENAME
          This allows one to set trace outputs to FILENAME from the default
          specified at startup.
      Signed-off-by: 's avatarPrerna Saxena <prerna@linux.vnet.ibm.com>
      Signed-off-by: 's avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
    • Prerna Saxena's avatar
      trace: Support for dynamically enabling/disabling trace events · 22890ab5
      Prerna Saxena authored
      This patch adds support for dynamically enabling/disabling of trace events.
      This is done by internally maintaining each trace event's state, and
      permitting logging of data from a trace event only if it is in an
      'active' state.
      Monitor commands added :
      1) info trace-events 		: to view all available trace events and
      				  their state.
      2) trace-event NAME on|off 	: to enable/disable data logging from a
      				  given trace event.
      				  Eg, trace-event paio_submit off
      				  	disables logging of data when
      					paio_submit is hit.
      By default, all trace-events are disabled. One can enable desired trace-events
      via the monitor.
      Signed-off-by: 's avatarPrerna Saxena <prerna@linux.vnet.ibm.com>
      Signed-off-by: 's avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      trace: Monitor command 'info trace'
      Monitor command 'info trace' to display contents of trace buffer
      Signed-off-by: 's avatarPrerna Saxena <prerna@linux.vnet.ibm.com>
      Signed-off-by: 's avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      trace: Remove monitor.h dependency from simpletrace
      User-mode targets don't have a monitor so the simple trace backend
      currently does not build on those targets.  This patch abstracts the
      monitor printing interface so there is no direct coupling between
      simpletrace and the monitor.
      Signed-off-by: 's avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
    • Stefan Hajnoczi's avatar
      trace: Add simple built-in tracing backend · 26f7227b
      Stefan Hajnoczi authored
      This patch adds a simple tracer which produces binary trace files.  To
      try out the simple backend:
      $ ./configure --trace-backend=simple
      $ make
      After running QEMU you can pretty-print the trace:
      $ ./simpletrace.py trace-events trace.log
      The output of simpletrace.py looks like this:
        qemu_realloc 0.699 ptr=0x24363f0 size=0x3 newptr=0x24363f0
        qemu_free 0.768 ptr=0x24363f0
        ^           ^---- timestamp delta (us)
        |____ trace event name
      Signed-off-by: 's avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      trace: Make trace record fields 64-bit
      Explicitly use 64-bit fields in trace records so that timestamps and
      magic numbers work for 32-bit host builds.
      Includes fixes from Prerna Saxena <prerna@linux.vnet.ibm.com>.
      Signed-off-by: 's avatarPrerna Saxena <prerna@linux.vnet.ibm.com>
      Signed-off-by: 's avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>