Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751428AbbEZG6j (ORCPT ); Tue, 26 May 2015 02:58:39 -0400 Received: from [133.145.228.44] ([133.145.228.44]:60417 "EHLO mail9.hitachi.co.jp" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751182AbbEZG63 (ORCPT ); Tue, 26 May 2015 02:58:29 -0400 X-AuditID: 85900ec0-9f5ccb9000001a57-a1-55641972a91b Subject: [PATCH trace-cmd V6 0/7] trce-cmd: add virtual machine tracing From: Masami Hiramatsu To: Steven Rostedt Cc: Aaron Fabbri , linux-kernel@vger.kernel.org, yoshihiro.yunomae@aktsk.jp, Divya Vyas , Hidehiro Kawai , cti.systems-productivity-manager.ts@hitachi.com Date: Tue, 26 May 2015 15:55:22 +0900 Message-ID: <20150526065522.16023.30813.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3729 Lines: 97 Hi, This is the version 6 series of virtio-trace for trace-cmd. The previous series is here; https://lkml.org/lkml/2014/12/22/79 I took over this work from Yoshihiro Yunomae. This version updates previous patch on the latest trace-cmd tree and recover Yoshihiro's signed-off and original authorship. How to use ========== 1. Run virt-server on a host # trace-cmd virt-server --dom guest1 -c 2 2. Set up of virtio-serial pipe of guest1 on the host Add the following tags to domain XML files. # virsh edit guest1 3. Boot the guest # virsh start guest1 4. Run the guest1's client(see trace-cmd-record(1) with the *--virt* option) # trace-cmd record -e sched* --virt If you want to boot another guest sends trace-data via virtio-serial, you will manually make the guest domain directory and trace data I/Fs. - Make guest domain directory on the host # mkdir -p /tmp/trace-cmd/virt/ # chmod 710 /tmp/trace-cmd/virt/ # chgrp qemu /tmp/trace-cmd/virt/ - Make FIFO on the host # mkfifo /tmp/trace-cmd/virt//trace-path-cpu{0,1,...,X}.{in,out} TODO ==== - Don't use fixed directory and fifos. Make it flexible. - Don't depend on the libvirt. We can find fifos in /proc//fd/*. - Cleanup the code. It is not well structured now. Thank you, --- Yoshihiro YUNOMAE (7): trace-cmd: Support -N option for trace-cmd extract trace-cmd/listen: Introduce trace-msg protocol (protocol v2) trace-cmd/msg: Use poll(2) to wait for a message trace-cmd/virt-server: Add virt-server mode for a virtualization environment trace-cmd/record: Add --virt option for record mode trace-cmd/virt-server: Add --dom option which makes a domain directory to virt-server trace-cmd: Use pid instead of libvirt virt domain name Documentation/Protocol.txt | 163 +++++ Documentation/trace-cmd-record.1.txt | 12 Documentation/trace-cmd-virt-server.1.txt | 113 ++++ Makefile | 3 trace-cmd.c | 3 trace-cmd.h | 15 + trace-listen.c | 687 +++++++++++++++++++---- trace-msg.c | 870 +++++++++++++++++++++++++++++ trace-msg.h | 31 + trace-output.c | 4 trace-record.c | 158 +++++ trace-recorder.c | 50 +- trace-usage.c | 18 + 13 files changed, 1991 insertions(+), 136 deletions(-) create mode 100644 Documentation/Protocol.txt create mode 100644 Documentation/trace-cmd-virt-server.1.txt create mode 100644 trace-msg.c create mode 100644 trace-msg.h -- Masami HIRAMATSU Linux Technology Research Center, System Productivity Research Dept. Center for Technology Innovation - Systems Engineering Hitachi, Ltd., Research & Development Group E-mail: masami.hiramatsu.pt@hitachi.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/