lkml.org 
[lkml]   [2019]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/7] perf evsel: Add iterator to iterate over events ordered by CPU
On Wed, Oct 30, 2019 at 12:03:28PM -0700, Andi Kleen wrote:
> >
> > > The exists evlist->cpus cannot be used (I tried that)
> > > I also don't think we have an existing function to merge
> > > two maps, so that would need to be added to create it.
> > > Just using ->cpu_index is a much simpler change.
> >
> > I dont think that would be lot of code
> > and it would simplify this one
>
> AFAIK they're not guaranteed to be sorted, which makes merging
> complicated. I'm not sure it's safe to just sort existing maps
> because someone might have a index.

we could add bitmap to maps, then combining them
would be just a matter of or-ing them

>
> So you'll need to create temporary maps, sort them and then
> merge. Won't be simple.

it's also not simple to read simple event close code now

jirka

\
 
 \ /
  Last update: 2019-11-01 09:38    [W:1.421 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site