All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Mike Galbraith <efault@gmx.de>, Paul Mackerras <paulus@samba.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 3/2] perf tools: Use DECLARE_BITMAP instead of an open-coded array
Date: Sat, 17 Oct 2009 18:03:41 +0200	[thread overview]
Message-ID: <20091017160338.GA10344@nowhere> (raw)
In-Reply-To: <1255795038-13751-1-git-send-email-fweisbec@gmail.com>

On Sat, Oct 17, 2009 at 05:57:18PM +0200, Frederic Weisbecker wrote:
> Use DECLARE_BITMAP instead of an open coded array for our bitmap
> of featured sections.
> 
> This makes the array an unsigned long instead of a u64 but since
> we use a 256 bits bitmap, the array size shouldn't vary between
> different boxes.


That said I would really feel more comfortable if someone can
confirm that.



> @@ -143,12 +141,12 @@ struct perf_file_header {
>  	struct perf_file_section	attrs;
>  	struct perf_file_section	data;
>  	struct perf_file_section	event_types;
> -	feat_mask_t			adds_features;
> +	DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS);


I think having adds_features as an unsigned long won't
hurt because we have HEAD_FEAT_BITS % 64 == 0

It would certainly hurt if we had, say, HEAD_FEAT_BITS = 257

But may be I forget a corner case. I hope someone can double
check that. Thanks.


  reply	other threads:[~2009-10-17 16:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-15 21:10 [PATCH] perf tools: Add a new generic section in perf.data Frederic Weisbecker
2009-10-16  7:10 ` Ingo Molnar
2009-10-16  7:33   ` Frederic Weisbecker
2009-10-16  7:42     ` Ingo Molnar
2009-10-17 15:12       ` [PATCH 1/2] perf tools: Use kernel bitmap library Frederic Weisbecker
2009-10-19  7:55         ` [tip:perf/core] " tip-bot for Frederic Weisbecker
2009-10-17 15:12       ` [PATCH 2/2] perf tools: Introduce bitmask'ed additional headers Frederic Weisbecker
2009-10-19  7:56         ` [tip:perf/core] " tip-bot for Frederic Weisbecker
2009-10-17 15:57       ` [PATCH 3/2] perf tools: Use DECLARE_BITMAP instead of an open-coded array Frederic Weisbecker
2009-10-17 16:03         ` Frederic Weisbecker [this message]
2009-10-19  7:30           ` Ingo Molnar
2009-10-19 19:40             ` Frederic Weisbecker
2009-10-19  7:56         ` [tip:perf/core] " tip-bot for Frederic Weisbecker

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=20091017160338.GA10344@nowhere \
    --to=fweisbec@gmail.com \
    --cc=acme@redhat.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.