Em Fri, Oct 23, 2015 at 09:58:20PM +0800, pi3orama escreveu: > > > 发自我的 iPhone > > > 在 2015年10月23日,下午9:51,Arnaldo Carvalho de Melo <[email protected]> 写道: > > > > Em Fri, Oct 23, 2015 at 10:43:49AM +0000, Wang Nan escreveu: > >> Inherit bit is useless for a system wide evsel [1]. Further kernel > >> improvements are giving more constrain [2] on inherit events. This > >> patch set inherit bit to 0 to avoid potential constrains. > >> > >> [1] > >> http://lkml.kernel.org/r/[email protected] > >> [2] > >> http://lkml.kernel.org/r/[email protected] > >> > >> Signed-off-by: Wang Nan <[email protected]> > >> Cc: Arnaldo Carvalho de Melo <[email protected]> > >> Cc: Alexei Starovoitov <[email protected]> > >> Cc: Peter Zijlstra <[email protected]> > >> Cc: Li Zefan <[email protected]> > >> Cc: [email protected] > >> Link: http://lkml.kernel.org/n/[email protected] > >> --- > >> > >> evsel->system_wide doesn't correct reflect whether this evsel is system > >> wide or not, so checks pid when invoking perf_event_open, and it is > >> always correct. > > > > Can't we do this at perf_evlist__config() or perf_evsel__config() time? > > perf_evlist_config() is excluded because perf record doesn't use it.
Yeah, we need to make it use it :-\ > > We have record_opts at perf_evsel__config() time and I think we should > > leave changing the attr at perf_evsel__open() time for feature > > fallbacks, i.e. something we will only know when trying to use, which is > > different from this inherit-on-syswide case, that we know far in advance > > we will not need. > > I tried to set this bit based on evsel->system_wide but it seems not reliable > as it should be, so I was wondering whether it is designed for other use. I > will look > into this next week. Ok, thanks in advance, lemme go back looking at eBPF :-) - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

