public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: a.p.zijlstra@chello.nl, mingo@elte.hu, paulus@samba.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] perf tool: Initialize events IDs in a single function
Date: Sat, 19 Nov 2011 23:03:58 -0200	[thread overview]
Message-ID: <20111120010358.GE13052@ghostprotocols.net> (raw)
In-Reply-To: <20111120013621.GA2248@krava.redhat.com>

Em Sat, Nov 19, 2011 at 08:36:21PM -0500, Jiri Olsa escreveu:
> On Fri, Nov 18, 2011 at 12:22:55PM -0200, Arnaldo Carvalho de Melo wrote:
> > Em Fri, Nov 18, 2011 at 02:46:42PM +0100, Jiri Olsa escreveu:
> > > Currently events' IDs initialization is scattered among the
> > > code. Adding function 'perf_evlist__init_ids' to allocate
> > > and retrive events' IDs in one place.

> > I'm ok with this one, will merge it in my perf/core branch together with
> > a fix for a bug I noticed in the original code and that remains with
> > your changes: consider what happens if we do a second perf_evlist__mmap,
> > we will call perf_evlist__id_add_fd again and thus bump evsel->ids++
> > over nr_threads * nr_cpus, overflowing it.

> is there a valid scenario for this function to be called more than once?
> I'd think that just ensuring this is called once is enough

I don't know, I just don't want to preclude that, crystal balls are not
that reliable :-)

- Arnaldo

  reply	other threads:[~2011-11-20  1:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-18 13:46 [RFC,PATCH] perf tool: Refactoring IO data files code Jiri Olsa
2011-11-18 13:46 ` [PATCH 1/5] perf tool: Fix session host_nachine retrieval Jiri Olsa
2011-11-18 14:24   ` Arnaldo Carvalho de Melo
2011-11-18 13:46 ` [PATCH 2/5] perf tool: Initialize events IDs in a single function Jiri Olsa
2011-11-18 14:22   ` Arnaldo Carvalho de Melo
2011-11-20  1:36     ` Jiri Olsa
2011-11-20  1:03       ` Arnaldo Carvalho de Melo [this message]
2011-11-18 13:46 ` [PATCH 3/5] perf tool: Introducing perf_mmap object Jiri Olsa
2011-11-18 14:37   ` Arnaldo Carvalho de Melo
2011-11-20  1:39     ` Jiri Olsa
2011-11-18 13:46 ` [PATCH 4/5] perf tool: Introducing perf_data object Jiri Olsa
2011-11-18 13:46 ` [PATCH 5/5] perf tool: Putting mmap support to " Jiri Olsa
2011-11-18 14:14 ` [RFC,PATCH] perf tool: Refactoring IO data files code Arnaldo Carvalho de Melo
2011-11-20  2:03 ` [RFC,PATCHv2] " Jiri Olsa
2011-11-20  2:03   ` [PATCHv2 1/5] perf tool: Fix session host_nachine retrieval Jiri Olsa
2011-11-20  2:03   ` [PATCHv2 2/5] perf tool: Initialize events IDs in a single function Jiri Olsa
2011-11-20  2:03   ` [PATCHv2 3/5] perf tool: Introducing perf_mmap object Jiri Olsa
2011-11-20  2:03   ` [PATCHv2 4/5] perf tool: Introducing perf_data object Jiri Olsa
2011-11-20  2:03   ` [PATCHv2 5/5] perf tool: Putting mmap support to " Jiri Olsa

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=20111120010358.GE13052@ghostprotocols.net \
    --to=acme@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox