From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgz4J-00059s-2d for qemu-devel@nongnu.org; Mon, 05 Sep 2016 14:56:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgz4D-0008Jv-54 for qemu-devel@nongnu.org; Mon, 05 Sep 2016 14:56:30 -0400 Received: from roura.ac.upc.edu ([147.83.33.10]:57342 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgz4C-0008Jl-Of for qemu-devel@nongnu.org; Mon, 05 Sep 2016 14:56:25 -0400 From: =?utf-8?b?TGx1w61z?= Vilanova Date: Mon, 5 Sep 2016 20:56:22 +0200 Message-Id: <147310178240.10840.14758930096407696981.stgit@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 0/6] hypertrace: Lightweight guest-to-QEMU trace channel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Daniel P Berrange , Luiz Capitulino , Eric Blake , Stefan Hajnoczi The hypertrace channel allows guest code to emit events in QEMU (the host= ) using its tracing infrastructure (see "docs/trace.txt"). This works in both 'sy= stem' and 'user' modes, is architecture-agnostic and introduces minimal noise o= n the guest. See first commit for a full description, use-cases and an example. Signed-off-by: Llu=C3=ADs Vilanova --- Changes in v2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D * Remove unnecessary casts for g2h() [Eric Blake]. * Use perror() [Eric Blake]. * Avoid expansions in application example [Eric Blake]. * Add copyright in document "hypertrace.txt" [Eric Blake]. * Make the user-mode hypertrace invocations thread-safe [Stefan Hajnoczi]. * Split dynamic hypertrace configuration into a separate "config" channel. Changes in v3 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D * Fix calculation of arguments. * Rebase on e00da55 Llu=C3=ADs Vilanova (6): hypertrace: Add documentation hypertrace: Add tracing event "guest_hypertrace" hypertrace: [*-user] Add QEMU-side proxy to "guest_hypertrace" even= t hypertrace: [softmmu] Add QEMU-side proxy to "guest_hypertrace" eve= nt hypertrace: Add guest-side user-level library hypertrace: Add guest-side Linux module Makefile | 8=20 Makefile.objs | 6=20 bsd-user/main.c | 16 + bsd-user/mmap.c | 15 + bsd-user/syscall.c | 31 +- configure | 40 ++ docs/hypertrace.txt | 227 +++++++++++++ docs/tracing.txt | 3=20 hypertrace/Makefile.objs | 21 + hypertrace/common.c | 26 ++ hypertrace/common.h | 24 + hypertrace/guest/linux-module/Kbuild.in | 7=20 hypertrace/guest/linux-module/Makefile | 23 + .../include/linux/qemu-hypertrace-internal.h | 46 +++ .../linux-module/include/linux/qemu-hypertrace.h | 73 ++++ hypertrace/guest/linux-module/qemu-hypertrace.c | 146 +++++++++ hypertrace/guest/user/Makefile | 30 ++ hypertrace/guest/user/common.c | 301 ++++++++++++++= ++++ hypertrace/guest/user/qemu-hypertrace.h | 80 +++++ hypertrace/softmmu.c | 235 ++++++++++++++ hypertrace/user.c | 339 ++++++++++++++= ++++++ hypertrace/user.h | 61 ++++ include/hw/pci/pci.h | 2=20 include/qom/cpu.h | 4=20 linux-user/main.c | 19 + linux-user/mmap.c | 17 + linux-user/qemu.h | 3=20 linux-user/syscall.c | 31 +- trace/Makefile.objs | 2=20 29 files changed, 1809 insertions(+), 27 deletions(-) create mode 100644 docs/hypertrace.txt create mode 100644 hypertrace/Makefile.objs create mode 100644 hypertrace/common.c create mode 100644 hypertrace/common.h create mode 100644 hypertrace/guest/linux-module/Kbuild.in create mode 100644 hypertrace/guest/linux-module/Makefile create mode 100644 hypertrace/guest/linux-module/include/linux/qemu-hype= rtrace-internal.h create mode 100644 hypertrace/guest/linux-module/include/linux/qemu-hype= rtrace.h create mode 100644 hypertrace/guest/linux-module/qemu-hypertrace.c create mode 100644 hypertrace/guest/user/Makefile create mode 100644 hypertrace/guest/user/common.c create mode 100644 hypertrace/guest/user/qemu-hypertrace.h create mode 100644 hypertrace/softmmu.c create mode 100644 hypertrace/user.c create mode 100644 hypertrace/user.h To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi Cc: Eric Blake Cc: Luiz Capitulino Cc: Daniel P Berrange