[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a47b44ba-320e-88fe-300f-193996fc067a@huawei.com>
Date: Mon, 7 Dec 2020 18:04:21 +0000
From: John Garry <john.garry@...wei.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
CC: <peterz@...radead.org>, <mingo@...hat.com>, <mark.rutland@....com>,
<alexander.shishkin@...ux.intel.com>, <jolsa@...hat.com>,
<namhyung@...nel.org>, <will@...nel.org>,
<mathieu.poirier@...aro.org>, <leo.yan@...aro.org>,
<irogers@...gle.com>, <qiangqing.zhang@....com>,
<kjain@...ux.ibm.com>, <linux-kernel@...r.kernel.org>,
<zhangshaokun@...ilicon.com>,
<linux-arm-kernel@...ts.infradead.org>, <linuxarm@...wei.com>,
<kan.liang@...ux.intel.com>, <kim.phillips@....com>,
<ak@...ux.intel.com>
Subject: Re: [PATCH v6 08/10] perf metricgroup: Support printing metric groups
for system PMUs
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@...e 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@...e perf]$
>
> It ended up as:
>
> [acme@...e 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@...e perf]$o
>
Hi Arnaldo,
OK, I'll be less wasteful in my struct organization.
Thanks,
John
Powered by blists - more mailing lists