[PATCH 00/13] Add multiple trace backend function and add new ftrace backend for libvirt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Xinghai Yu <yuxinghai@xxxxxxxxxxxxxx>

This patch set will let libvirt to support multiple trace backend function
and add a new 'ftrace' backend at the same time.
Then, libvirt would have 2 trace backend: dtrace, ftrace.They can be used
alone or together.

Patchs 1,2,3,4,5 are used for supporting multiple trace backend function.
Patch 6 are used for adding ftrace as a new trace backend for libvirt.
Patchs 7,8,9,10,11,12,13 add ftrace initial code in programs who use it.

Thanks very much for Stefan Hajnoczi for I have used his scripts in patch 
4 which commited in qemu.
Thanks very much for Eiichi Tsukata for I have used his ftrace codes in 
patch 6 which commited in qemu.

Backgroud:
The existing trace mechanism in libvirt is dtrace. Although the dtrace
can work, it's not work well enough. Every time we want get information
from the trace point we must write a systemtap script and run it
together with libvirt.

That's really unpractical on some occasion, especially on production
server since the systemtap script can't be executed automatically.
And some problems may be not easy to reproduce, then it will cost a
lot of time to get the trace information again.

So I think it is essential to add supporting for record the trace
information automatically in libvirt to satisfy the user's requirement.
That's why I implemented multiple trace backend function and ftrace 
support in libvirt.


Xinghai Yu (13):
  configure.ac: Define new macro 'WITH_TRACE_PROBES' to indicate trace
    function are available
  Makefile.am: Add new multiple trace backend supporting framework
  src: Use new tracepoint declaration files to replace the old dtrace
    declaration files to support multiple trace function
  src: Add scripts 'tracetool' to supporting the translation from
    tracepoint files to multiple trace backend supporting files
  daemon,src: Use new tracepoint function calls to replace old PROBE
    macro calls to support multiple trace function
  configure.ac, Makefile.am, src: Add new ftrace backend
  src/libvirt.c: Init ftrace backend in libvirt library so that programs
    containing it can use ftrace
  src/qemu/qemu_driver.c: Init ftrace backend in qemu driver so that
    qemu driver can support ftrace
  src/locking/lock_daemon.c: Init ftrace backend in program 'virtlockd'
  src/util/iohelper.c: Init ftrace backend in program 'libvirt_iohelper'
  src/storage/parthelper.c: Init ftrace backend in program
    'libvirt_parthelper'
  src/lxc/lxc_controller.c: Init ftrace backend in program 'libvirt_lxc'
  src/security/virt-aa-helper.c: Init ftrace backend in program
    'virt-aa-helper'

 config-post.h                     |   2 +-
 configure.ac                      |  24 ++++
 daemon/Makefile.am                |  13 +-
 daemon/remote.c                   |  77 +++++------
 src/Makefile.am                   | 179 +++++++++++++++++++------
 src/ftrace.c                      |  91 +++++++++++++
 src/ftrace.h                      |  14 ++
 src/internal.h                    |  69 +----------
 src/libvirt.c                     |   9 ++
 src/libvirt_probes.d              |  82 ------------
 src/libvirt_qemu_probes.d         |  22 ----
 src/libvirt_qemu_trace_events     |  15 +++
 src/libvirt_trace_events          |  70 ++++++++++
 src/locking/lock_daemon.c         |   9 ++
 src/lxc/lxc_controller.c          |   9 ++
 src/qemu/qemu_driver.c            |  10 ++
 src/qemu/qemu_monitor.c           |  42 +++---
 src/qemu/qemu_monitor_json.c      |  12 +-
 src/qemu/qemu_monitor_text.c      |   8 +-
 src/rpc/virkeepalive.c            |  42 +++---
 src/rpc/virnetclient.c            |  43 +++---
 src/rpc/virnetserverclient.c      |  31 ++---
 src/rpc/virnetsocket.c            |  22 ++--
 src/rpc/virnettlscontext.c        |  42 +++---
 src/security/virt-aa-helper.c     |   9 ++
 src/storage/parthelper.c          |   9 ++
 src/tracetool.py                  | 103 +++++++++++++++
 src/tracetool/__init__.py         | 268 ++++++++++++++++++++++++++++++++++++++
 src/tracetool/backend/__init__.py | 120 +++++++++++++++++
 src/tracetool/backend/trace.py    | 112 ++++++++++++++++
 src/tracetool/format/__init__.py  | 103 +++++++++++++++
 src/tracetool/format/c.py         |  22 ++++
 src/tracetool/format/d.py         |  20 +++
 src/tracetool/format/h.py         |  22 ++++
 src/util/iohelper.c               |   9 ++
 src/util/vireventpoll.c           |  66 +++++-----
 src/util/virobject.c              |  16 ++-
 tests/Makefile.am                 |  13 +-
 tools/virsh.c                     |   3 +
 39 files changed, 1429 insertions(+), 401 deletions(-)
 create mode 100644 src/ftrace.c
 create mode 100644 src/ftrace.h
 delete mode 100644 src/libvirt_probes.d
 delete mode 100644 src/libvirt_qemu_probes.d
 create mode 100644 src/libvirt_qemu_trace_events
 create mode 100644 src/libvirt_trace_events
 create mode 100644 src/tracetool.py
 create mode 100644 src/tracetool/__init__.py
 create mode 100644 src/tracetool/backend/__init__.py
 create mode 100644 src/tracetool/backend/trace.py
 create mode 100644 src/tracetool/format/__init__.py
 create mode 100644 src/tracetool/format/c.py
 create mode 100644 src/tracetool/format/d.py
 create mode 100644 src/tracetool/format/h.py

-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]