lkml.org 
[lkml]   [2011]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] perf tool: Initialize events IDs in a single function
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

jirka


\
 
 \ /
  Last update: 2011-11-19 19:41    [W:0.120 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site