From patchwork Wed Jun 14 22:27:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 105602 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp512460qgd; Wed, 14 Jun 2017 15:28:57 -0700 (PDT) X-Received: by 10.98.218.25 with SMTP id c25mr2155847pfh.118.1497479337693; Wed, 14 Jun 2017 15:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497479337; cv=none; d=google.com; s=arc-20160816; b=Z8cLOqH88GjzE30GgYqcLPnJiJvWdYSo0fr0FFFEXQ3ITQiixYIMf2shWxjm3OvA4n 3pVh6Me7A4dd/31S/92VPvV5VWtxmx1d7E8FptNjMYAe2H7pRf3qwdrgC9Wqr3X8jztO f8bFQwubZEuTjo1bAfqI9Mrec/CjRIQ4ecD9qP2uK2QDMd4fi055WkJd0ngkMO6OxA+m crVyj15AjuZAOJPJnQQ1xsiptZmctdBQu/2AeHhaIApTnDeujZ+6NDfo1eBqQnXpsmpZ 7DOSKzfAu9OaMnH3qirnLXKpr6shVo6zkOIm5Scss7Y4+8Xs6O0V/zwG8zQDA5NDsUtH aWqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Q7Bsik+1Zdm+4FLcEkRcz5h8xSr2Nl7E9Ujdn03Ud+k=; b=nGHr5CWgSNzVEp3Et8lcC68VsyAg0imRGoxV+9dqtbRqbiiDnQe+Qn2z/7ASS3hRnj aDK5qZm5WhSS0FXbdXTzAu8leQ5pzYs0Hy/QiNIGDyxWnmFA+cu1hPZW+vSWkujEwv8l mQqBg118ap5gGihahH6OhI0yOyq11bQERQ3ry9l/0Bzmdz6p1kN2GL8oKmz7VcUawuQ0 PkaxvxERM26V9IZKd3Aw8tZjD9kw81xVW8HW4SLBCpPc53FnPk0kjHoAv00NhrSazhEa zKjPWGiUm/ymFHENMBWkXRPxeoMm0tJaH/qqY3bFvqlDjr9bD9fjXRNUbl57OYaT1Wep /2qw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si863056pln.492.2017.06.14.15.28.57; Wed, 14 Jun 2017 15:28:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752875AbdFNW2l (ORCPT + 25 others); Wed, 14 Jun 2017 18:28:41 -0400 Received: from foss.arm.com ([217.140.101.70]:39706 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752080AbdFNW1h (ORCPT ); Wed, 14 Jun 2017 18:27:37 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4D384199B; Wed, 14 Jun 2017 15:27:37 -0700 (PDT) Received: from beelzebub.ast.arm.com (beelzebub.austin.arm.com [10.118.12.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B91F03F3E1; Wed, 14 Jun 2017 15:27:36 -0700 (PDT) From: Jeremy Linton To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, rostedt@goodmis.org, mingo@redhat.com, rusty@rustcorp.com.au, jeyu@redhat.com, kirill.shutemov@linux.intel.com, christoffer.dall@linaro.org, marc.zyngier@arm.com, jcm@jonmasters.org, clemens@ladisch.de, perex@perex.cz Subject: [PATCH v2 11/13] tracing: Add TRACE_DEFINE_SIZEOF() macros Date: Wed, 14 Jun 2017 17:27:27 -0500 Message-Id: <20170614222729.16521-12-jeremy.linton@arm.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170614222729.16521-1-jeremy.linton@arm.com> References: <20170614222729.16521-1-jeremy.linton@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are a few places in the kernel where sizeof() is already being used. Update those locations with TRACE_DEFINE_SIZEOF. Signed-off-by: Jeremy Linton --- arch/arm64/kvm/trace.h | 2 ++ drivers/net/fjes/fjes_trace.h | 2 ++ include/trace/events/xen.h | 13 +++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) -- 2.9.4 diff --git a/arch/arm64/kvm/trace.h b/arch/arm64/kvm/trace.h index 7fb0008..5188c70 100644 --- a/arch/arm64/kvm/trace.h +++ b/arch/arm64/kvm/trace.h @@ -93,6 +93,8 @@ TRACE_EVENT(kvm_arm_set_dreg32, TP_printk("%s: 0x%08x", __entry->name, __entry->value) ); +TRACE_DEFINE_SIZEOF(__u64); + TRACE_EVENT(kvm_arm_set_regset, TP_PROTO(const char *type, int len, __u64 *control, __u64 *value), TP_ARGS(type, len, control, value), diff --git a/drivers/net/fjes/fjes_trace.h b/drivers/net/fjes/fjes_trace.h index cca01a1..d9c8ca6 100644 --- a/drivers/net/fjes/fjes_trace.h +++ b/drivers/net/fjes/fjes_trace.h @@ -62,6 +62,8 @@ TRACE_EVENT(fjes_hw_issue_request_command, __entry->cs_complete, __entry->timeout, __entry->ret) ); +TRACE_DEFINE_SIZEOF(u8); + TRACE_EVENT(fjes_hw_request_info, TP_PROTO(struct fjes_hw *hw, union fjes_device_command_res *res_buf), TP_ARGS(hw, res_buf), diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h index 31acce9..b70a38b 100644 --- a/include/trace/events/xen.h +++ b/include/trace/events/xen.h @@ -30,6 +30,8 @@ DECLARE_EVENT_CLASS(xen_mc__batch, DEFINE_XEN_MC_BATCH(xen_mc_batch); DEFINE_XEN_MC_BATCH(xen_mc_issue); +TRACE_DEFINE_SIZEOF(ulong); + TRACE_EVENT(xen_mc_entry, TP_PROTO(struct multicall_entry *mc, unsigned nargs), TP_ARGS(mc, nargs), @@ -40,8 +42,8 @@ TRACE_EVENT(xen_mc_entry, ), TP_fast_assign(__entry->op = mc->op; __entry->nargs = nargs; - memcpy(__entry->args, mc->args, sizeof(unsigned long) * nargs); - memset(__entry->args + nargs, 0, sizeof(unsigned long) * (6 - nargs)); + memcpy(__entry->args, mc->args, sizeof(ulong) * nargs); + memset(__entry->args + nargs, 0, sizeof(ulong) * (6 - nargs)); ), TP_printk("op %u%s args [%lx, %lx, %lx, %lx, %lx, %lx]", __entry->op, xen_hypercall_name(__entry->op), @@ -122,6 +124,7 @@ TRACE_EVENT(xen_mc_extend_args, __entry->res == XEN_MC_XE_NO_SPACE ? "NO_SPACE" : "???") ); +TRACE_DEFINE_SIZEOF(pteval_t); /* mmu */ DECLARE_EVENT_CLASS(xen_mmu__set_pte, TP_PROTO(pte_t *ptep, pte_t pteval), @@ -199,6 +202,8 @@ TRACE_EVENT(xen_mmu_pte_clear, __entry->mm, __entry->addr, __entry->ptep) ); +TRACE_DEFINE_SIZEOF(pmdval_t); + TRACE_EVENT(xen_mmu_set_pmd, TP_PROTO(pmd_t *pmdp, pmd_t pmdval), TP_ARGS(pmdp, pmdval), @@ -226,6 +231,8 @@ TRACE_EVENT(xen_mmu_pmd_clear, #if CONFIG_PGTABLE_LEVELS >= 4 +TRACE_DEFINE_SIZEOF(pudval_t); + TRACE_EVENT(xen_mmu_set_pud, TP_PROTO(pud_t *pudp, pud_t pudval), TP_ARGS(pudp, pudval), @@ -241,6 +248,8 @@ TRACE_EVENT(xen_mmu_set_pud, (int)sizeof(pudval_t) * 2, (unsigned long long)__entry->pudval) ); +TRACE_DEFINE_SIZEOF(p4dval_t); + TRACE_EVENT(xen_mmu_set_p4d, TP_PROTO(p4d_t *p4dp, p4d_t *user_p4dp, p4d_t p4dval), TP_ARGS(p4dp, user_p4dp, p4dval),