1. 03 2月, 2016 4 次提交
  2. 07 1月, 2016 2 次提交
    • S
      trace: add make dependencies on tracetool source · cef517ca
      Stefan Hajnoczi 提交于
      Patches that change tracetool can break the build if old build output
      files are lying around.
      
      This happens because the Makefile does not specify dependencies on
      tracetool.  The build will use old object files that do not match the
      current source code.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      cef517ca
    • S
      trace: fix make foo-timestamp rules · 9967e4fe
      Stefan Hajnoczi 提交于
      The Makefile uses intermediate timestamp files to avoid rebuilding if
      tracetool output is unchanged.
      
      Timestamps are implemented incorrectly.  This was fixed for rules.mak in
      commit 4b25966a ("rules.mak: cleanup
      config generation rules") but never fixed in trace/Makefile.objs.
      
      The problem with the old timestamp implementation was that make doesn't
      notice the updated file modification time until the next time it is run.
      It was necessary to run make twice in a row to achieve a full rebuild.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      9967e4fe
  3. 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
  4. 10 3月, 2015 1 次提交
  5. 26 9月, 2014 2 次提交
  6. 09 9月, 2014 1 次提交
  7. 12 8月, 2014 4 次提交
  8. 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
  9. 09 6月, 2014 4 次提交
  10. 08 5月, 2014 2 次提交
  11. 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
  12. 12 3月, 2014 1 次提交
  13. 19 2月, 2014 1 次提交
  14. 27 1月, 2014 2 次提交
  15. 03 5月, 2013 1 次提交
    • E
      trace: Add ftrace tracing backend · 781e9545
      Eiichi Tsukata 提交于
      This patch adds a ftrace tracing backend which sends trace event to
      ftrace marker file. You can effectively compare qemu trace data and
      kernel(especially, kvm.ko when using KVM) trace data.
      The ftrace backend is restricted to Linux only.
      
      To try out the ftrace backend:
      
       $ ./configure --trace-backend=ftrace
       $ make
      
      if you use KVM, enable kvm events in ftrace:
      
       # sudo echo 1 > /sys/kernel/debug/tracing/events/kvm/enable
      
      After running qemu by root user, you can get the trace:
      
       # cat /sys/kernel/debug/tracing/trace
      Signed-off-by: NEiichi Tsukata <eiichi.tsukata.xh@hitachi.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      781e9545
  16. 28 3月, 2013 6 次提交
  17. 13 2月, 2013 2 次提交
  18. 06 2月, 2013 3 次提交
  19. 30 1月, 2013 1 次提交