Re: [PATCH] perf tools: Fix pthread_attr_setaffinity_np() feature detection on Ubuntu systems
From: Ingo Molnar
Date: Sun Mar 01 2015 - 11:11:45 EST
* Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
> agreed, sry about that.. I'll try to clean it up while moving
> features detection into tools/ as you suggested before
That would be nice!
> > --- a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
> > +++ b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
> > @@ -5,10 +5,12 @@ int main(void)
> > {
> > int ret = 0;
> > pthread_attr_t thread_attr;
> > + cpu_set_t cpu_mask;
> >
> > pthread_attr_init(&thread_attr);
> > - /* don't care abt exact args, just the API itself in libpthread */
> > - ret = pthread_attr_setaffinity_np(&thread_attr, 0, NULL);
> > + CPU_ZERO(&cpu_mask);
> > +
> > + ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_mask), &cpu_mask);
>
> I think Arnaldo got this one covered in perf/urgent already, but I
> might have missed something..
Ok, I'll wait for his set of fixes.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/