Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CE0BC433FE for ; Mon, 7 Dec 2020 18:06:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 AF4BD2371F for ; Mon, 7 Dec 2020 18:06:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF4BD2371F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZJW3nqcxYUJJs5thVv+ocgpOkhq6XEv0JmWTPB/Qh6g=; b=ugoHHvgRFmwIVRF54qA//7Wm6 sB0N0+lgpk+ZnEwqwpcuRAD8WJqnLHApvbig4hFWvA/SuvtDNCZmxxC5qHQpxfU5VYc03GCGSsL7k vXrf2D5hHnXbdpQYlneFfIE76id9+8OnY5Hii2KS24FoyGSLWFEYVb85BZHtnK7YbGUchLoatt6qD Juh8XPsFLb/kTZZryQsi6N2Iv8FCrpNt+ymSCnkhAx1GusV+aDIRBo1l/lzvtCf18gB8UU3/Wo9Ao jDdAoCcwce4gtKORL+O+oAmOt6IHB+y3SQZpBXLLwevbg+K2NsM6O4Q/fbf5nogQ0vC0JUHb5YdKx AQtlUXMwg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmKsh-0007nP-TB; Mon, 07 Dec 2020 18:05:03 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmKsb-0007l4-36 for linux-arm-kernel@lists.infradead.org; Mon, 07 Dec 2020 18:04:59 +0000 Received: from fraeml745-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4CqWPS0Kgjz67McX; Tue, 8 Dec 2020 02:02:52 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml745-chm.china.huawei.com (10.206.15.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 7 Dec 2020 19:04:55 +0100 Received: from [10.210.169.98] (10.210.169.98) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 7 Dec 2020 18:04:53 +0000 Subject: Re: [PATCH v6 08/10] perf metricgroup: Support printing metric groups for system PMUs To: Arnaldo Carvalho de Melo References: <1607080216-36968-1-git-send-email-john.garry@huawei.com> <1607080216-36968-9-git-send-email-john.garry@huawei.com> <20201207172319.GD129853@kernel.org> From: John Garry Message-ID: Date: Mon, 7 Dec 2020 18:04:21 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20201207172319.GD129853@kernel.org> Content-Language: en-US X-Originating-IP: [10.210.169.98] X-ClientProxiedBy: lhreml719-chm.china.huawei.com (10.201.108.70) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201207_130457_346437_BB137B72 X-CRM114-Status: UNSURE ( 9.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, irogers@google.com, ak@linux.intel.com, mathieu.poirier@linaro.org, peterz@infradead.org, will@kernel.org, linuxarm@huawei.com, qiangqing.zhang@nxp.com, linux-kernel@vger.kernel.org, zhangshaokun@hisilicon.com, alexander.shishkin@linux.intel.com, kjain@linux.ibm.com, mingo@redhat.com, leo.yan@linaro.org, namhyung@kernel.org, kim.phillips@amd.com, jolsa@redhat.com, linux-arm-kernel@lists.infradead.org, kan.liang@linux.intel.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 07/12/2020 17:23, Arnaldo Carvalho de Melo wrote: >> +struct metricgroup_print_sys_idata { >> + struct strlist *metriclist; >> + bool metricgroups; >> + char *filter; >> + bool raw; >> + bool details; >> + struct rblist *groups; >> +}; > I'm doing some reorg to avoid these holes: > > [acme@five perf]$ pahole -C metricgroup_print_sys_idata ~/bin/perf > struct metricgroup_print_sys_idata { > struct strlist * metriclist; /* 0 8 */ > _Bool metricgroups; /* 8 1 */ > > /* XXX 7 bytes hole, try to pack */ > > char * filter; /* 16 8 */ > _Bool raw; /* 24 1 */ > _Bool details; /* 25 1 */ > > /* XXX 6 bytes hole, try to pack */ > > struct rblist * groups; /* 32 8 */ > > /* size: 40, cachelines: 1, members: 6 */ > /* sum members: 27, holes: 2, sum holes: 13 */ > /* last cacheline: 40 bytes */ > }; > [acme@five perf]$ > > It ended up as: > > [acme@five perf]$ pahole -C metricgroup_print_sys_idata ~/bin/perf > struct metricgroup_print_sys_idata { > struct strlist * metriclist; /* 0 8 */ > char * filter; /* 8 8 */ > struct rblist * groups; /* 16 8 */ > _Bool metricgroups; /* 24 1 */ > _Bool raw; /* 25 1 */ > _Bool details; /* 26 1 */ > > /* size: 32, cachelines: 1, members: 6 */ > /* padding: 5 */ > /* last cacheline: 32 bytes */ > }; > [acme@five perf]$o > Hi Arnaldo, OK, I'll be less wasteful in my struct organization. Thanks, John _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel