From patchwork Tue Oct 6 12:08:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11818547 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 888586CA for ; Tue, 6 Oct 2020 12:11:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F50F20663 for ; Tue, 6 Oct 2020 12:11:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Q0nHtbtg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F50F20663 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:46990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPloG-00058I-52 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 06 Oct 2020 08:11:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPlnA-0003Mm-BE for qemu-devel@nongnu.org; Tue, 06 Oct 2020 08:10:04 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:44550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPln7-0004Dm-Vr for qemu-devel@nongnu.org; Tue, 06 Oct 2020 08:10:04 -0400 Received: by mail-pl1-x641.google.com with SMTP id h2so1117082pll.11 for ; Tue, 06 Oct 2020 05:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ChWuKq12YEBlrVQq4Iva9E7cg0lDlX98+uvW3A3EDFU=; b=Q0nHtbtgCA/rPt07KzbJ9+UaXJUZvRdskOPP47GpIoRdVyz4D2ik6TezGtkoIaxmHF fARW2a/0bPMCv7REiIAxMILK+aAEJGvnS2Ghcgej6DjKGFPR7thCIDn1+ZYLBmRsio9W fJ3Da+54SDY+DPCkxD1NvbwD1xhPrJicivJNTTVH6RsL17YbzjWpvBcAZIzgXris3pOg IzZUl3DBteHS30S+uuTiNTJfweWCpPk4Wh6CfPK8pv8MK9clMbgI2bfatMEnFJ+QBMqT zk6WXLUExYtHEdSQgI/gNXJYHmzQtGCKj8xdAKPIAXnkNDI4tBrdJQ/uHwhywbH9x3Ft WBXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ChWuKq12YEBlrVQq4Iva9E7cg0lDlX98+uvW3A3EDFU=; b=EVvaHXdJOVSjSSh5bdCpO0ICK/0cHrys8p4vjXMuS6G+PUPud5a6OO8tuFJXYf+1FZ PbNfnyeuZ7hDQTBqQWuQGgts0HS4Rk30ISrltIWPPhmQrqNkieYeu9Tszm/yttdAwwVk GnZ7EG4EFiVDp6mOt0hYTl1I1HFYsHP3J7kXQ1H6FddPWmOpa9kRkQZW5xfDt4vLOFQf zTO/5KD3FLxERX/dB+fjWi7/mEYYWRajfVOxE0bPw8Xy1dvctzBViARx0K9ZqosQYlYQ YCKoqZbW6//JwO3JfBOs27XCt2YWgXHZ+3xojurpAannjQGKMoQMcVht/qvLCeqjOPAF ZL/w== X-Gm-Message-State: AOAM532U4S54JtZLNsY6tyg9B10VwHp8FUuF4FFsUMjlL3h+/hDVgBwB lAqQGtVE6CpPM6m5+g2RCO+JWJl8ufVy0A== X-Google-Smtp-Source: ABdhPJxnPS65Yk4e6fTu4UvMdrVzT9i8MaRPkgWO1SUeMLIXcHjDVX8kOcLU2GSjf/WYnxmklQsjxA== X-Received: by 2002:a17:90a:e088:: with SMTP id q8mr4260818pjy.172.1601986200303; Tue, 06 Oct 2020 05:10:00 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id f4sm2965681pgk.19.2020.10.06.05.09.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Oct 2020 05:09:59 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v5 3/7] plugin: getting qemu_plugin_get_hwaddr only expose one function prototype Date: Tue, 6 Oct 2020 20:08:56 +0800 Message-Id: <20201006120900.1579-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20201006120900.1579-1-luoyonggang@gmail.com> References: <20201006120900.1579-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::641; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x641.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Yonggang Luo , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is used for counting how much function are export to qemu plugin. Signed-off-by: Yonggang Luo Reviewed-by: Alex Bennée --- plugins/api.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/api.c b/plugins/api.c index bbdc5a4eb4..13177d3578 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -251,10 +251,12 @@ bool qemu_plugin_mem_is_store(qemu_plugin_meminfo_t info) #ifdef CONFIG_SOFTMMU static __thread struct qemu_plugin_hwaddr hwaddr_info; +#endif struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info, uint64_t vaddr) { +#ifdef CONFIG_SOFTMMU CPUState *cpu = current_cpu; unsigned int mmu_idx = info >> TRACE_MEM_MMU_SHIFT; hwaddr_info.is_store = info & TRACE_MEM_ST; @@ -266,14 +268,10 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info, } return &hwaddr_info; -} #else -struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info, - uint64_t vaddr) -{ return NULL; -} #endif +} bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr) {