1. 19 4月, 2019 1 次提交
  2. 12 12月, 2018 1 次提交
  3. 29 6月, 2018 1 次提交
  4. 19 9月, 2017 1 次提交
    • A
      Convert single line fprintf(.../n) to warn_report() · 2ab4b135
      Alistair Francis 提交于
      Convert all the single line uses of fprintf(stderr, "warning:"..."\n"...
      to use warn_report() instead. This helps standardise on a single
      method of printing warnings to the user.
      
      All of the warnings were changed using this command:
        find ./* -type f -exec sed -i \
          's|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig' \
          {} +
      
      Some of the lines were manually edited to reduce the line length to below
      80 charecters.
      
      The #include lines were manually updated to allow the code to compile.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Max Reitz <mreitz@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Yongbok Kim <yongbok.kim@imgtec.com>
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: James Hogan <james.hogan@imgtec.com> [mips]
      Message-Id: <ae8f8a7f0a88ded61743dff2adade21f8122a9e7.1505158760.git.alistair.francis@xilinx.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2ab4b135
  5. 01 2月, 2017 1 次提交
  6. 12 10月, 2016 2 次提交
    • D
      trace: emit name <-> ID mapping in simpletrace header · 7f1b588f
      Daniel P. Berrange 提交于
      Currently simpletrace assumes that events are given IDs
      starting from 0, based on the order in which they appear
      in the trace-events file, with no gaps. When the
      trace-events file is split up, this assumption becomes
      problematic.
      
      To deal with this, extend the simpletrace format so that
      it outputs a table of event name <-> ID mappings. That
      will allow QEMU to assign arbitrary IDs to events without
      breaking simpletrace parsing.
      
      The v3 simple trace format was
      
        FILE HEADER
        EVENT TRACE RECORD 0
        EVENT TRACE RECORD 1
        ...
        EVENT TRACE RECORD N
      
      The v4 simple trace format is now
      
        FILE HEADER
        EVENT MAPPING RECORD 0
        EVENT MAPPING RECORD 1
        ...
        EVENT MAPPING RECORD M
        EVENT TRACE RECORD RECORD 0
        EVENT TRACE RECORD RECORD 1
        ...
        EVENT TRACE RECORD N
      
      Although this shows all the mapping records being emitted
      upfront, this is not required by the format. While the main
      simpletrace backend will emit all mappings at startup,
      the systemtap simpletrace.stp script will emit the mappings
      at first use. eg
      
        FILE HEADER
        ...
        EVENT MAPPING RECORD 0
        EVENT TRACE RECORD RECORD 0
        EVENT TRACE RECORD RECORD 1
        EVENT MAPPING RECORD 1
        EVENT TRACE RECORD RECORD 2
        ...
        EVENT TRACE RECORD N
      
      This is more space efficient given that most trace records
      only include a subset of events.
      
      In modifying the systemtap simpletrace code, a 'begin' probe
      was added to emit the trace event header, so you no longer
      need to add '--no-header' when running simpletrace.py for
      systemtap generated trace files.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1475588159-30598-12-git-send-email-berrange@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      7f1b588f
    • D
      trace: remove the TraceEventID and TraceEventVCPUID enums · ef4c9fc8
      Daniel P. Berrange 提交于
      The TraceEventID and TraceEventVCPUID enums constants are
      no longer actually used for anything critical.
      
      The TRACE_EVENT_COUNT limit is used to determine the size
      of the TraceEvents array, and can be removed if we just
      NULL terminate the array instead.
      
      The TRACE_VCPU_EVENT_COUNT limit is used as a magic value
      for marking non-vCPU events, and also for declaring the
      size of the trace dstate mask in the CPUState struct.
      The former usage can be replaced by a dedicated constant
      TRACE_EVENT_VCPU_NONE, defined as (uint32_t)-1. For the
      latter usage, we can simply define a constant for the
      number of VCPUs, avoiding the need for the full enum.
      
      The only other usages of the enum values can be replaced
      by accesing the id/vcpu_id fields via the named TraceEvent
      structs.
      Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1475588159-30598-11-git-send-email-berrange@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ef4c9fc8
  7. 18 5月, 2016 1 次提交
  8. 05 2月, 2016 1 次提交
    • P
      all: Clean up includes · d38ea87a
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1454089805-5470-16-git-send-email-peter.maydell@linaro.org
      d38ea87a
  9. 03 2月, 2016 1 次提交
  10. 30 11月, 2015 1 次提交
    • S
      trace/simple: Fix warning and wrong trace file name for MinGW · 857a0e38
      Stefan Weil 提交于
      On Windows, getpid() always returns an int value, but pid_t (which is
      expected by the format string) is either a 32 bit or a 64 bit value.
      
      Without a type cast (or a modified format string), the compiler prints
      a warning when building for 64 bit Windows and the resulting trace_file_name
      will include a wrong pid:
      
      trace/simple.c:332:9: warning:
       format ‘%lld’ expects argument of type ‘long long int’,
       but argument 2 has type ‘int’ [-Wformat=]
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      857a0e38
  11. 10 6月, 2014 1 次提交
    • M
      glib-compat.h: add new thread API emulation on top of pre-2.31 API · 86946a2d
      Michael Tokarev 提交于
      Thread API changed in glib-2.31 significantly.  Before that version,
      conditionals and mutexes were only allocated dynamically, using
      _new()/_free() interface.  in 2.31 and up, they're allocated statically
      as regular variables, and old interface is deprecated.
      
      (Note: glib docs says the new interface is available since version
      2.32, but it was actually introduced in version 2.31).
      
      Create the new interface using old primitives, by providing non-opaque
      definitions of the base types (GCond and GMutex) using GOnces.
      
      Replace #ifdeffery around GCond and GMutex in trace/simple.c and
      coroutine-gthread.c too because it does not work anymore with the new
      glib-compat.h.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      [Use GOnce to support lazy initialization; introduce CompatGMutex
       and CompatGCond.  - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      86946a2d
  12. 09 6月, 2014 2 次提交
    • L
      trace: Multi-backend tracing · 5b808275
      Lluís Vilanova 提交于
      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: NLluís Vilanova <vilanova@ac.upc.edu>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      5b808275
    • S
      trace: add pid field to simpletrace record · 26896cbf
      Stefan Hajnoczi 提交于
      It is useful to know the QEMU process ID when working with traces from
      multiple VMs.  Although the trace filename may contain the pid, tools
      that aggregate traces or even trace globally need somewhere to record
      the pid.
      
      There is a reserved field in the trace event header struct that we can
      use.
      
      It is not necessary to bump the simpletrace file format version number
      because it has already been incremented for the QEMU 2.1 release cycle
      in commit "trace: [simple] Bump up log version number".
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      26896cbf
  13. 08 5月, 2014 1 次提交
  14. 25 3月, 2014 1 次提交
    • S
      osdep: initialize glib threads in all QEMU tools · ae2990c2
      Stefan Hajnoczi 提交于
      glib versions prior to 2.31.0 require an explicit g_thread_init() call
      to enable multi-threading.
      
      Failure to initialize threading causes glib to take single-threaded code
      paths without synchronization.  For example, the g_slice allocator will
      crash due to race conditions.
      
      Fix this for all QEMU tool programs (qemu-nbd, qemu-io, qemu-img) by
      moving the g_thread_init() call from vl.c:main() into a new
      osdep.c:thread_init() constructor function.
      
      thread_init() has __attribute__((constructor)) and is automatically
      invoked by the runtime during startup.
      
      We can now drop the "simple" trace backend's g_thread_init() call since
      thread_init() already called it.
      
      Note that we must keep coroutine-gthread.c's g_thread_init() call which
      is located in a constructor function.  There is no guarantee for
      constructor function ordering so thread_init() may only be called later.
      Reported-by: NMario de Chenno <mario.dechenno@unina2.it>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ae2990c2
  15. 27 1月, 2014 2 次提交
  16. 28 3月, 2013 1 次提交
  17. 13 2月, 2013 2 次提交
  18. 06 2月, 2013 3 次提交
  19. 19 12月, 2012 1 次提交
  20. 14 8月, 2012 5 次提交
  21. 19 7月, 2012 2 次提交
  22. 08 6月, 2012 1 次提交
  23. 12 3月, 2012 1 次提交
  24. 21 12月, 2011 1 次提交
  25. 01 11月, 2011 1 次提交
  26. 21 9月, 2011 2 次提交
  27. 01 9月, 2011 2 次提交