mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: <peterz@infradead.org>, <mingo@redhat.com>,
	<mark.rutland@arm.com>, <alexander.shishkin@linux.intel.com>,
	<jolsa@redhat.com>, <namhyung@kernel.org>, <will@kernel.org>,
	<mathieu.poirier@linaro.org>, <leo.yan@linaro.org>,
	<irogers@google.com>, <qiangqing.zhang@nxp.com>,
	<kjain@linux.ibm.com>, <linux-kernel@vger.kernel.org>,
	<zhangshaokun@hisilicon.com>,
	<linux-arm-kernel@lists.infradead.org>, <linuxarm@huawei.com>,
	<kan.liang@linux.intel.com>, <kim.phillips@amd.com>,
	<ak@linux.intel.com>
Subject: Re: [PATCH v6 08/10] perf metricgroup: Support printing metric groups for system PMUs
Date: Mon, 7 Dec 2020 18:04:21 +0000	[thread overview]
Message-ID: <a47b44ba-320e-88fe-300f-193996fc067a@huawei.com> (raw)
In-Reply-To: <20201207172319.GD129853@kernel.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


  reply	other threads:[~2020-12-07 18:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 11:10 [PATCH v6 00/10] perf pmu-events: Support event aliasing " John Garry
2020-12-04 11:10 ` [PATCH v6 01/10] perf jevents: Add support for an extra directory level John Garry
2020-12-04 11:10 ` [PATCH v6 02/10] perf jevents: Add support for system events tables John Garry
2020-12-04 11:10 ` [PATCH v6 03/10] perf pmu: Add pmu_id() John Garry
2020-12-04 11:10 ` [PATCH v6 04/10] perf pmu: Add pmu_add_sys_aliases() John Garry
2020-12-04 11:10 ` [PATCH v6 05/10] perf evlist: Change perf_evlist__splice_list_tail() ordering John Garry
2020-12-04 11:10 ` [PATCH v6 06/10] perf metricgroup: Fix metrics using aliases covering multiple PMUs John Garry
2020-12-07 17:19   ` Arnaldo Carvalho de Melo
2020-12-07 18:02     ` John Garry
2020-12-04 11:10 ` [PATCH v6 07/10] perf metricgroup: Split up metricgroup__print() John Garry
2020-12-04 11:10 ` [PATCH v6 08/10] perf metricgroup: Support printing metric groups for system PMUs John Garry
2020-12-07 17:23   ` Arnaldo Carvalho de Melo
2020-12-07 18:04     ` John Garry [this message]
2020-12-04 11:10 ` [PATCH v6 09/10] perf metricgroup: Support adding metrics " John Garry
2020-12-04 11:10 ` [PATCH v6 10/10] perf vendor events: Add JSON metrics for imx8mm DDR Perf John Garry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a47b44ba-320e-88fe-300f-193996fc067a@huawei.com \
    --to=john.garry@huawei.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@linux.intel.com \
    --cc=kim.phillips@amd.com \
    --cc=kjain@linux.ibm.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=qiangqing.zhang@nxp.com \
    --cc=will@kernel.org \
    --cc=zhangshaokun@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®