All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: pi3orama <pi3orama@163.com>
Cc: Wang Nan <wangnan0@huawei.com>,
	linux-kernel@vger.kernel.org,
	Alexei Starovoitov <ast@plumgrid.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Li Zefan <lizefan@huawei.com>
Subject: Re: [RFC PATCH] perf tools: Don't set inherit bit for system wide evsel
Date: Fri, 23 Oct 2015 13:17:49 -0300	[thread overview]
Message-ID: <20151023161749.GF27006@kernel.org> (raw)
In-Reply-To: <3E5B2C7C-BD19-4B61-AEDC-D1E2CFE0D7D2@163.com>

Em Fri, Oct 23, 2015 at 09:58:20PM +0800, pi3orama escreveu:
> 
> 
> 发自我的 iPhone
> 
> > 在 2015年10月23日,下午9:51,Arnaldo Carvalho de Melo <acme@kernel.org> 写道:
> > 
> > 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/20151022124142.GQ17308@twins.programming.kicks-ass.net
> >> [2] http://lkml.kernel.org/r/1445559014-4667-1-git-send-email-ast@kernel.org
> >> 
> >> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> >> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> >> Cc: Alexei Starovoitov <ast@plumgrid.com>
> >> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> >> Cc: Li Zefan <lizefan@huawei.com>
> >> Cc: pi3orama@163.com
> >> Link: http://lkml.kernel.org/n/ebpf-0tgilipxoo6fiebcxu3ft866@git.kernel.org
> >> ---
> >> 
> >> 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

  reply	other threads:[~2015-10-23 16:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 10:43 [RFC PATCH] perf tools: Don't set inherit bit for system wide evsel Wang Nan
2015-10-23 13:51 ` Arnaldo Carvalho de Melo
2015-10-23 13:58   ` pi3orama
2015-10-23 16:17     ` Arnaldo Carvalho de Melo [this message]
2015-10-26  9:08       ` Wangnan (F)
2015-10-26  9:25         ` Adrian Hunter
2015-10-26 11:48           ` Wangnan (F)

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=20151023161749.GF27006@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ast@plumgrid.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=pi3orama@163.com \
    --cc=wangnan0@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.