From patchwork Thu Jun 9 16:57:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 9167525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 81CA160467 for ; Thu, 9 Jun 2016 17:12:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69A2A264F4 for ; Thu, 9 Jun 2016 17:12:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CA8E28356; Thu, 9 Jun 2016 17:12:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=2.0 tests=BAYES_00,FSL_HELO_HOME, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 837A7264F4 for ; Thu, 9 Jun 2016 17:12:54 +0000 (UTC) Received: from localhost ([::1]:35921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB3Vl-0001P0-IS for patchwork-qemu-devel@patchwork.kernel.org; Thu, 09 Jun 2016 13:12:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB3IB-0005P5-CH for qemu-devel@nongnu.org; Thu, 09 Jun 2016 12:58:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bB3I5-0004v7-7u for qemu-devel@nongnu.org; Thu, 09 Jun 2016 12:58:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB3I4-0004v1-Vb for qemu-devel@nongnu.org; Thu, 09 Jun 2016 12:58:45 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7E933C00356A; Thu, 9 Jun 2016 16:58:44 +0000 (UTC) Received: from t530wlan.home.berrange.com.com (vpn1-5-191.ams2.redhat.com [10.36.5.191]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u59GwbiW021940; Thu, 9 Jun 2016 12:58:43 -0400 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Thu, 9 Jun 2016 17:57:58 +0100 Message-Id: <1465491514-7365-5-git-send-email-berrange@redhat.com> In-Reply-To: <1465491514-7365-1-git-send-email-berrange@redhat.com> References: <1465491514-7365-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 09 Jun 2016 16:58:44 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v1 04/40] trace: split out trace events for io/ directory X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Move all trace-events for files in the io/ directory to their own file. Signed-off-by: Daniel P. Berrange --- Makefile.objs | 1 + io/trace-events | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ trace-events | 62 ---------------------------------------- 3 files changed, 89 insertions(+), 62 deletions(-) create mode 100644 io/trace-events diff --git a/Makefile.objs b/Makefile.objs index c6e915e..7577dca 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -121,3 +121,4 @@ ivshmem-server-obj-y = contrib/ivshmem-server/ trace-events-y = trace-events trace-events-y += util/trace-events trace-events-y += crypto/trace-events +trace-events-y += io/trace-events diff --git a/io/trace-events b/io/trace-events new file mode 100644 index 0000000..3a9cfb6 --- /dev/null +++ b/io/trace-events @@ -0,0 +1,88 @@ +# Trace events for debugging and performance instrumentation +# +# This file is processed by the tracetool script during the build. +# +# To add a new trace event: +# +# 1. Choose a name for the trace event. Declare its arguments and format +# string. +# +# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() -> +# trace_multiwrite_cb(). The source file must #include "trace.h". +# +# Format of a trace event: +# +# [disable] ( [, ] ...) "" +# +# Example: g_malloc(size_t size) "size %zu" +# +# The "disable" keyword will build without the trace event. +# +# The must be a valid as a C function name. +# +# Types should be standard C types. Use void * for pointers because the trace +# system may not have the necessary headers included. +# +# The should be a sprintf()-compatible format string. + +# io/buffer.c +buffer_resize(const char *buf, size_t olen, size_t len) "%s: old %zd, new %zd" +buffer_move_empty(const char *buf, size_t len, const char *from) "%s: %zd bytes from %s" +buffer_move(const char *buf, size_t len, const char *from) "%s: %zd bytes from %s" +buffer_free(const char *buf, size_t len) "%s: capacity %zd" + +# io/task.c +qio_task_new(void *task, void *source, void *func, void *opaque) "Task new task=%p source=%p func=%p opaque=%p" +qio_task_complete(void *task) "Task complete task=%p" +qio_task_abort(void *task) "Task abort task=%p" +qio_task_thread_start(void *task, void *worker, void *opaque) "Task thread start task=%p worker=%p opaque=%p" +qio_task_thread_run(void *task) "Task thread run task=%p" +qio_task_thread_exit(void *task) "Task thread exit task=%p" +qio_task_thread_result(void *task) "Task thread result task=%p" + +# io/channel-socket.c +qio_channel_socket_new(void *ioc) "Socket new ioc=%p" +qio_channel_socket_new_fd(void *ioc, int fd) "Socket new ioc=%p fd=%d" +qio_channel_socket_connect_sync(void *ioc, void *addr) "Socket connect sync ioc=%p addr=%p" +qio_channel_socket_connect_async(void *ioc, void *addr) "Socket connect async ioc=%p addr=%p" +qio_channel_socket_connect_fail(void *ioc) "Socket connect fail ioc=%p" +qio_channel_socket_connect_complete(void *ioc, int fd) "Socket connect complete ioc=%p fd=%d" +qio_channel_socket_listen_sync(void *ioc, void *addr) "Socket listen sync ioc=%p addr=%p" +qio_channel_socket_listen_async(void *ioc, void *addr) "Socket listen async ioc=%p addr=%p" +qio_channel_socket_listen_fail(void *ioc) "Socket listen fail ioc=%p" +qio_channel_socket_listen_complete(void *ioc, int fd) "Socket listen complete ioc=%p fd=%d" +qio_channel_socket_dgram_sync(void *ioc, void *localAddr, void *remoteAddr) "Socket dgram sync ioc=%p localAddr=%p remoteAddr=%p" +qio_channel_socket_dgram_async(void *ioc, void *localAddr, void *remoteAddr) "Socket dgram async ioc=%p localAddr=%p remoteAddr=%p" +qio_channel_socket_dgram_fail(void *ioc) "Socket dgram fail ioc=%p" +qio_channel_socket_dgram_complete(void *ioc, int fd) "Socket dgram complete ioc=%p fd=%d" +qio_channel_socket_accept(void *ioc) "Socket accept start ioc=%p" +qio_channel_socket_accept_fail(void *ioc) "Socket accept fail ioc=%p" +qio_channel_socket_accept_complete(void *ioc, void *cioc, int fd) "Socket accept complete ioc=%p cioc=%p fd=%d" + +# io/channel-file.c +qio_channel_file_new_fd(void *ioc, int fd) "File new fd ioc=%p fd=%d" +qio_channel_file_new_path(void *ioc, const char *path, int flags, int mode, int fd) "File new fd ioc=%p path=%s flags=%d mode=%d fd=%d" + +# io/channel-tls.c +qio_channel_tls_new_client(void *ioc, void *master, void *creds, const char *hostname) "TLS new client ioc=%p master=%p creds=%p hostname=%s" +qio_channel_tls_new_server(void *ioc, void *master, void *creds, const char *aclname) "TLS new client ioc=%p master=%p creds=%p acltname=%s" +qio_channel_tls_handshake_start(void *ioc) "TLS handshake start ioc=%p" +qio_channel_tls_handshake_pending(void *ioc, int status) "TLS handshake pending ioc=%p status=%d" +qio_channel_tls_handshake_fail(void *ioc) "TLS handshake fail ioc=%p" +qio_channel_tls_handshake_complete(void *ioc) "TLS handshake complete ioc=%p" +qio_channel_tls_credentials_allow(void *ioc) "TLS credentials allow ioc=%p" +qio_channel_tls_credentials_deny(void *ioc) "TLS credentials deny ioc=%p" + +# io/channel-websock.c +qio_channel_websock_new_server(void *ioc, void *master) "Websock new client ioc=%p master=%p" +qio_channel_websock_handshake_start(void *ioc) "Websock handshake start ioc=%p" +qio_channel_websock_handshake_pending(void *ioc, int status) "Websock handshake pending ioc=%p status=%d" +qio_channel_websock_handshake_reply(void *ioc) "Websock handshake reply ioc=%p" +qio_channel_websock_handshake_fail(void *ioc) "Websock handshake fail ioc=%p" +qio_channel_websock_handshake_complete(void *ioc) "Websock handshake complete ioc=%p" + +# io/channel-command.c +qio_channel_command_new_pid(void *ioc, int writefd, int readfd, int pid) "Command new pid ioc=%p writefd=%d readfd=%d pid=%d" +qio_channel_command_new_spawn(void *ioc, const char *binary, int flags) "Command new spawn ioc=%p binary=%s flags=%d" +qio_channel_command_abort(void *ioc, int pid) "Command abort ioc=%p pid=%d" +qio_channel_command_wait(void *ioc, int pid, int ret, int status) "Command abort ioc=%p pid=%d ret=%d status=%d" diff --git a/trace-events b/trace-events index 2bbef21..e5ac18c 100644 --- a/trace-events +++ b/trace-events @@ -1435,12 +1435,6 @@ ppc_tb_adjust(uint64_t offs1, uint64_t offs2, int64_t diff, int64_t seconds) "ad prep_io_800_writeb(uint32_t addr, uint32_t val) "0x%08" PRIx32 " => 0x%02" PRIx32 prep_io_800_readb(uint32_t addr, uint32_t retval) "0x%08" PRIx32 " <= 0x%02" PRIx32 -# io/buffer.c -buffer_resize(const char *buf, size_t olen, size_t len) "%s: old %zd, new %zd" -buffer_move_empty(const char *buf, size_t len, const char *from) "%s: %zd bytes from %s" -buffer_move(const char *buf, size_t len, const char *from) "%s: %zd bytes from %s" -buffer_free(const char *buf, size_t len) "%s: capacity %zd" - # target-s390x/mmu_helper.c get_skeys_nonzero(int rc) "SKEY: Call to get_skeys unexpectedly returned %d" set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" @@ -1840,62 +1834,6 @@ user_host_signal(void *env, int host_sig, int target_sig) "env=%p signal %d (tar user_queue_signal(void *env, int target_sig) "env=%p signal %d" user_s390x_restore_sigregs(void *env, uint64_t sc_psw_addr, uint64_t env_psw_addr) "env=%p frame psw.addr %"PRIx64 " current psw.addr %"PRIx64 -# io/task.c -qio_task_new(void *task, void *source, void *func, void *opaque) "Task new task=%p source=%p func=%p opaque=%p" -qio_task_complete(void *task) "Task complete task=%p" -qio_task_abort(void *task) "Task abort task=%p" -qio_task_thread_start(void *task, void *worker, void *opaque) "Task thread start task=%p worker=%p opaque=%p" -qio_task_thread_run(void *task) "Task thread run task=%p" -qio_task_thread_exit(void *task) "Task thread exit task=%p" -qio_task_thread_result(void *task) "Task thread result task=%p" - -# io/channel-socket.c -qio_channel_socket_new(void *ioc) "Socket new ioc=%p" -qio_channel_socket_new_fd(void *ioc, int fd) "Socket new ioc=%p fd=%d" -qio_channel_socket_connect_sync(void *ioc, void *addr) "Socket connect sync ioc=%p addr=%p" -qio_channel_socket_connect_async(void *ioc, void *addr) "Socket connect async ioc=%p addr=%p" -qio_channel_socket_connect_fail(void *ioc) "Socket connect fail ioc=%p" -qio_channel_socket_connect_complete(void *ioc, int fd) "Socket connect complete ioc=%p fd=%d" -qio_channel_socket_listen_sync(void *ioc, void *addr) "Socket listen sync ioc=%p addr=%p" -qio_channel_socket_listen_async(void *ioc, void *addr) "Socket listen async ioc=%p addr=%p" -qio_channel_socket_listen_fail(void *ioc) "Socket listen fail ioc=%p" -qio_channel_socket_listen_complete(void *ioc, int fd) "Socket listen complete ioc=%p fd=%d" -qio_channel_socket_dgram_sync(void *ioc, void *localAddr, void *remoteAddr) "Socket dgram sync ioc=%p localAddr=%p remoteAddr=%p" -qio_channel_socket_dgram_async(void *ioc, void *localAddr, void *remoteAddr) "Socket dgram async ioc=%p localAddr=%p remoteAddr=%p" -qio_channel_socket_dgram_fail(void *ioc) "Socket dgram fail ioc=%p" -qio_channel_socket_dgram_complete(void *ioc, int fd) "Socket dgram complete ioc=%p fd=%d" -qio_channel_socket_accept(void *ioc) "Socket accept start ioc=%p" -qio_channel_socket_accept_fail(void *ioc) "Socket accept fail ioc=%p" -qio_channel_socket_accept_complete(void *ioc, void *cioc, int fd) "Socket accept complete ioc=%p cioc=%p fd=%d" - -# io/channel-file.c -qio_channel_file_new_fd(void *ioc, int fd) "File new fd ioc=%p fd=%d" -qio_channel_file_new_path(void *ioc, const char *path, int flags, int mode, int fd) "File new fd ioc=%p path=%s flags=%d mode=%d fd=%d" - -# io/channel-tls.c -qio_channel_tls_new_client(void *ioc, void *master, void *creds, const char *hostname) "TLS new client ioc=%p master=%p creds=%p hostname=%s" -qio_channel_tls_new_server(void *ioc, void *master, void *creds, const char *aclname) "TLS new client ioc=%p master=%p creds=%p acltname=%s" -qio_channel_tls_handshake_start(void *ioc) "TLS handshake start ioc=%p" -qio_channel_tls_handshake_pending(void *ioc, int status) "TLS handshake pending ioc=%p status=%d" -qio_channel_tls_handshake_fail(void *ioc) "TLS handshake fail ioc=%p" -qio_channel_tls_handshake_complete(void *ioc) "TLS handshake complete ioc=%p" -qio_channel_tls_credentials_allow(void *ioc) "TLS credentials allow ioc=%p" -qio_channel_tls_credentials_deny(void *ioc) "TLS credentials deny ioc=%p" - -# io/channel-websock.c -qio_channel_websock_new_server(void *ioc, void *master) "Websock new client ioc=%p master=%p" -qio_channel_websock_handshake_start(void *ioc) "Websock handshake start ioc=%p" -qio_channel_websock_handshake_pending(void *ioc, int status) "Websock handshake pending ioc=%p status=%d" -qio_channel_websock_handshake_reply(void *ioc) "Websock handshake reply ioc=%p" -qio_channel_websock_handshake_fail(void *ioc) "Websock handshake fail ioc=%p" -qio_channel_websock_handshake_complete(void *ioc) "Websock handshake complete ioc=%p" - -# io/channel-command.c -qio_channel_command_new_pid(void *ioc, int writefd, int readfd, int pid) "Command new pid ioc=%p writefd=%d readfd=%d pid=%d" -qio_channel_command_new_spawn(void *ioc, const char *binary, int flags) "Command new spawn ioc=%p binary=%s flags=%d" -qio_channel_command_abort(void *ioc, int pid) "Command abort ioc=%p pid=%d" -qio_channel_command_wait(void *ioc, int pid, int ret, int status) "Command abort ioc=%p pid=%d ret=%d status=%d" - # hw/timer/aspeed_timer.c aspeed_timer_ctrl_enable(uint8_t i, bool enable) "Timer %" PRIu8 ": %d" aspeed_timer_ctrl_external_clock(uint8_t i, bool enable) "Timer %" PRIu8 ": %d"