From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756201AbcETPjJ (ORCPT ); Fri, 20 May 2016 11:39:09 -0400 Received: from mail.kernel.org ([198.145.29.136]:43819 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754682AbcETPjH (ORCPT ); Fri, 20 May 2016 11:39:07 -0400 Date: Fri, 20 May 2016 12:39:02 -0300 From: Arnaldo Carvalho de Melo To: "Wangnan (F)" Cc: arnaldo.melo@gmail.com, linux-kernel@vger.kernel.org, He Kuang , Arnaldo Carvalho de Melo , Jiri Olsa , Masami Hiramatsu , Namhyung Kim , Zefan Li , pi3orama@163.com Subject: Re: [PATCH 09/17] perf tools: Detect avalibility of write_backward Message-ID: <20160520153902.GB8897@kernel.org> References: <1463126174-119290-1-git-send-email-wangnan0@huawei.com> <1463126174-119290-10-git-send-email-wangnan0@huawei.com> <20160513130854.GI11346@kernel.org> <573F2DE0.8090003@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <573F2DE0.8090003@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, May 20, 2016 at 11:31:44PM +0800, Wangnan (F) escreveu: > > > On 2016/5/13 21:08, Arnaldo Carvalho de Melo wrote: > > Em Fri, May 13, 2016 at 07:56:06AM +0000, Wang Nan escreveu: > > > Detect avalibility of write_backward and save the result into > > > record_opts. With write_backward the start pointer of a ring > > > buffer mapped read only can be found reliably. > > We have perf_missing_features for that, please try to use it. > > I'll try it, but write_backward can't fallback, if kernel doesn't > support it, I think we'd better throw an error earlier. Using > perf_missing_features we get error during opening the event, so if we want > to fail earlier we still need API probing. Conceptually 'perf_missing_features' shouldn't be strictly tied to fallbacking, its just a way to mark what perf features are missing in the current kernel, that info may be used for fallbacking, or for any other purpose. - Arnaldo