From patchwork Thu Jun 15 10:52:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 105633 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp740691qgd; Thu, 15 Jun 2017 03:53:58 -0700 (PDT) X-Received: by 10.84.231.136 with SMTP id g8mr5643663plk.257.1497524038137; Thu, 15 Jun 2017 03:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497524038; cv=none; d=google.com; s=arc-20160816; b=i5eRTF9SrkfOnTwr2IhSOkEC3HSMo8ju7Ty+hJLUnJ+s2WEBVysDMWsQlhPFLxgtYF D6z6mEcByWr6L6wS2XCkjEUPf2NsnHzfJNEBjyQstBRW9Yirmhlq1thZXfOX9loL7Y5f O8wExK5P42H0kHtESjiVyqRxKr3uNUT86Riuo4NHN5iULJvP//eHFUXy/t88zELjL0NR S0b9Exyg3UXeTqsSbeAWHJbSka/E/IH59aNVf450VMQeXWqgJJ0mW14IXAq5ruzKoHzi 1uWStx5zT/FNU9NjxKtpciSc9eFwbLXwWS8X/OnsSZWlo3ihFYXKUD/4RD6w8seiKmFn f5dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :references:subject:cc:to:from:date:user-agent:message-id :dmarc-filter:arc-authentication-results; bh=S3RsaFBxIA+ILDnTTZzadLpKzU29YD5Hi9TvH/YjsDw=; b=qAYRPbuyOnhJt7RnB7bRpZKLzzau3N4f0BNWV3OQa4b9zPjuJxudfVAX3cE8l3f79u THV8eq0XVljqR8fuY5/A65+f78/6f5d4rd0Aw3BAgKso/8bxrnVry8S/A2aZ0pimuf7p rxmOgUCck8D5Ow2dvQ8Mt1zkWBwQjoBW1nCy9l2DkNvEkF8HV/z1ouHy+RLfrCTGytA6 voHdbtk78V1WYzS7u3Lhb3//kEJO3Yts9DnBzSJ0eCu1F8w3LQzMOVsREz7alGwk5Kb9 aq4BBvz9+nvT2Sw8GKO7i9uBb0hVs1tQGbbdmg540jdFi5TbguusuMWx+/n1TU47aJ2g IuEw== 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 r21si2042810pgr.106.2017.06.15.03.53.57; Thu, 15 Jun 2017 03:53:58 -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 S1752570AbdFOKxe (ORCPT + 25 others); Thu, 15 Jun 2017 06:53:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:40638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752172AbdFOKw4 (ORCPT ); Thu, 15 Jun 2017 06:52:56 -0400 Received: from gandalf.local.home (cpe-67-246-153-56.stny.res.rr.com [67.246.153.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8757B239B5; Thu, 15 Jun 2017 10:52:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8757B239B5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Received: from rostedt by gandalf.local.home with local (Exim 4.87) (envelope-from ) id 1dLSOU-0003Mq-C9; Thu, 15 Jun 2017 06:52:54 -0400 Message-Id: <20170615105254.308688727@goodmis.org> User-Agent: quilt/0.63-1 Date: Thu, 15 Jun 2017 06:52:34 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Jeremy Linton Subject: [for-next][PATCH 11/12] tracing: Add TRACE_DEFINE_SIZEOF() macros References: <20170615105223.551999981@goodmis.org> MIME-Version: 1.0 Content-Disposition: inline; filename=0011-tracing-Add-TRACE_DEFINE_SIZEOF-macros.patch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeremy Linton There are a few places in the kernel where sizeof() is already being used. Update those locations with TRACE_DEFINE_SIZEOF. Link: http://lkml.kernel.org/r/20170531215653.3240-12-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) --- arch/arm64/kvm/trace.h | 2 ++ include/trace/events/xen.h | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) -- 2.10.2 diff --git a/arch/arm64/kvm/trace.h b/arch/arm64/kvm/trace.h index 7fb0008c4fa3..5188c7007169 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/include/trace/events/xen.h b/include/trace/events/xen.h index 31acce9019a6..b70a38b7fa84 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),