From nobody Tue May 7 22:28:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517502521308840.4236009971329; Thu, 1 Feb 2018 08:28:41 -0800 (PST) Received: from localhost ([::1]:46209 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehHj2-0005RX-BA for importer@patchew.org; Thu, 01 Feb 2018 11:28:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehHh7-0004Qq-Hg for qemu-devel@nongnu.org; Thu, 01 Feb 2018 11:26:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehHh2-0000eF-Bc for qemu-devel@nongnu.org; Thu, 01 Feb 2018 11:26:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53870) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehHh2-0000dZ-4P for qemu-devel@nongnu.org; Thu, 01 Feb 2018 11:26:32 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 166922D1C9 for ; Thu, 1 Feb 2018 16:26:31 +0000 (UTC) Received: from localhost (ovpn-117-253.ams2.redhat.com [10.36.117.253]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85609600C0; Thu, 1 Feb 2018 16:26:26 +0000 (UTC) From: Stefan Hajnoczi To: Date: Thu, 1 Feb 2018 16:26:25 +0000 Message-Id: <20180201162625.4276-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 01 Feb 2018 16:26:31 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] trace: avoid SystemTap "char const" warnings 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: Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" SystemTap's dtrace(1) produces the following warning when it encounters "char const" instead of "const char": Warning: /usr/bin/dtrace:trace-dtrace-root.dtrace:66: syntax error near: probe flatview_destroy_rcu Warning: Proceeding as if --no-pyparsing was given. This is a limitation in current SystemTap releases. I have sent a patch upstream to accept "char const" since it is valid C: https://sourceware.org/ml/systemtap/2018-q1/msg00017.html In QEMU we still wish to avoid warnings in the current SystemTap release. It's simple enough to replace "char const" with "const char". I'm not changing the documentation or implementing checks to prevent this from occurring again in the future. The next release of SystemTap will hopefully resolve this issue. Cc: Daniel P. Berrange Signed-off-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrange Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/block/trace-events | 4 ++-- trace-events | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/block/trace-events b/hw/block/trace-events index 5acd495207..6b9e733412 100644 --- a/hw/block/trace-events +++ b/hw/block/trace-events @@ -17,7 +17,7 @@ nvme_irq_msix(uint32_t vector) "raising MSI-X IRQ vector = %u" nvme_irq_pin(void) "pulsing IRQ pin" nvme_irq_masked(void) "IRQ is masked" nvme_dma_read(uint64_t prp1, uint64_t prp2) "DMA read, prp1=3D0x%"PRIx64" = prp2=3D0x%"PRIx64"" -nvme_rw(char const *verb, uint32_t blk_count, uint64_t byte_count, uint64_= t lba) "%s %"PRIu32" blocks (%"PRIu64" bytes) from LBA %"PRIu64"" +nvme_rw(const char *verb, uint32_t blk_count, uint64_t byte_count, uint64_= t lba) "%s %"PRIu32" blocks (%"PRIu64" bytes) from LBA %"PRIu64"" nvme_create_sq(uint64_t addr, uint16_t sqid, uint16_t cqid, uint16_t qsize= , uint16_t qflags) "create submission queue, addr=3D0x%"PRIx64", sqid=3D%"P= RIu16", cqid=3D%"PRIu16", qsize=3D%"PRIu16", qflags=3D%"PRIu16"" nvme_create_cq(uint64_t addr, uint16_t cqid, uint16_t vector, uint16_t siz= e, uint16_t qflags, int ien) "create completion queue, addr=3D0x%"PRIx64", = cqid=3D%"PRIu16", vector=3D%"PRIu16", qsize=3D%"PRIu16", qflags=3D%"PRIu16"= , ien=3D%d" nvme_del_sq(uint16_t qid) "deleting submission queue sqid=3D%"PRIu16"" @@ -25,7 +25,7 @@ nvme_del_cq(uint16_t cqid) "deleted completion queue, sqi= d=3D%"PRIu16"" nvme_identify_ctrl(void) "identify controller" nvme_identify_ns(uint16_t ns) "identify namespace, nsid=3D%"PRIu16"" nvme_identify_nslist(uint16_t ns) "identify namespace list, nsid=3D%"PRIu1= 6"" -nvme_getfeat_vwcache(char const* result) "get feature volatile write cache= , result=3D%s" +nvme_getfeat_vwcache(const char* result) "get feature volatile write cache= , result=3D%s" nvme_getfeat_numq(int result) "get feature number of queues, result=3D%d" nvme_setfeat_numq(int reqcq, int reqsq, int gotcq, int gotsq) "requested c= q_count=3D%d sq_count=3D%d, responding with cq_count=3D%d sq_count=3D%d" nvme_mmio_intm_set(uint64_t data, uint64_t new_mask) "wrote MMIO, interrup= t mask set, data=3D0x%"PRIx64", new_mask=3D0x%"PRIx64"" diff --git a/trace-events b/trace-events index ec95e67089..89fcad0fd1 100644 --- a/trace-events +++ b/trace-events @@ -73,13 +73,13 @@ flatview_destroy(FlatView *view, MemoryRegion *root) "%= p (root %p)" flatview_destroy_rcu(FlatView *view, MemoryRegion *root) "%p (root %p)" =20 # gdbstub.c -gdbstub_op_start(char const *device) "Starting gdbstub using device %s" +gdbstub_op_start(const char *device) "Starting gdbstub using device %s" gdbstub_op_exiting(uint8_t code) "notifying exit with code=3D0x%02x" gdbstub_op_continue(void) "Continuing all CPUs" gdbstub_op_continue_cpu(int cpu_index) "Continuing CPU %d" gdbstub_op_stepping(int cpu_index) "Stepping CPU %d" -gdbstub_op_extra_info(char const *info) "Thread extra info: %s" -gdbstub_hit_watchpoint(char const *type, int cpu_gdb_index, uint64_t vaddr= ) "Watchpoint hit, type=3D\"%s\" cpu=3D%d, vaddr=3D0x%" PRIx64 "" +gdbstub_op_extra_info(const char *info) "Thread extra info: %s" +gdbstub_hit_watchpoint(const char *type, int cpu_gdb_index, uint64_t vaddr= ) "Watchpoint hit, type=3D\"%s\" cpu=3D%d, vaddr=3D0x%" PRIx64 "" gdbstub_hit_internal_error(void) "RUN_STATE_INTERNAL_ERROR" gdbstub_hit_break(void) "RUN_STATE_DEBUG" gdbstub_hit_paused(void) "RUN_STATE_PAUSED" @@ -87,9 +87,9 @@ gdbstub_hit_shutdown(void) "RUN_STATE_SHUTDOWN" gdbstub_hit_io_error(void) "RUN_STATE_IO_ERROR" gdbstub_hit_watchdog(void) "RUN_STATE_WATCHDOG" gdbstub_hit_unknown(int state) "Unknown run state=3D0x%x" -gdbstub_io_reply(char const *message) "Sent: %s" -gdbstub_io_binaryreply(size_t ofs, char const *line) "0x%04zx: %s" -gdbstub_io_command(char const *command) "Received: %s" +gdbstub_io_reply(const char *message) "Sent: %s" +gdbstub_io_binaryreply(size_t ofs, const char *line) "0x%04zx: %s" +gdbstub_io_command(const char *command) "Received: %s" gdbstub_io_got_ack(void) "Got ACK" gdbstub_io_got_unexpected(uint8_t ch) "Got 0x%02x when expecting ACK/NACK" gdbstub_err_got_nack(void) "Got NACK, retransmitting" --=20 2.14.3