Received: by 10.223.176.5 with SMTP id f5csp805652wra; Fri, 2 Feb 2018 06:27:54 -0800 (PST) X-Google-Smtp-Source: AH8x2240u8WZc1wJ05a8fKkz+nhW/+rL3vwmAuc9Yj0a/WUTn/EDZyInXX62vGYCwJLrBnk3a18B X-Received: by 2002:a17:902:6006:: with SMTP id r6-v6mr18847241plj.78.1517581674895; Fri, 02 Feb 2018 06:27:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517581674; cv=none; d=google.com; s=arc-20160816; b=D8DyJ5/KOKeyRid/X59/m4MZ6GY5ppxphQGbtyYjMvlthULb76wOoMwBcwZluLNKTy RiRhck685jDVwi52f5n3Tn+iBqh6i/3aYZkn4KE1zMwJlUecX4u5tceSwHmwx3ptsyge GaKmFTZ9kco47DCHt58lIEosG7u9naUdFTYgti4IK8pi21OWazVX3ct0qa+Ka1nqwrG0 0tWgmjfPSNmvWpDQMd/z2uNeubFfuAhcC60SjeFt7orwt7d2UeaY18QeybGsZE1/oVXG XerX/wp7RWpQYlp0nhJR6hxBMkSCBiwJuj93dyyDWcDaRmwzhDHHq1wCmgNSVu9Tuq4N AHYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=CcVnkGJCdQJrHcvVorJ04LcaHckx4nYqwhozv/lGPfY=; b=DcRjbQ9ukSajs6PNPMXwpUif/jFYwVpECuDX3bwHW5xZ5xSoBDMVi7X4l2f2J9C1yT FyYx9z04Oy3eQGwSR0eHfgbppR+OANRtiDRp1qPgr/Lj0fQJ2yKjj3KkCs1piQkJx+f5 LuhwfPMlIpkOLAMo1f9P3B5vJF2ZPY3dbosC09T03IpTQkH56/weL4rEoMNES3+HbRUM Y8rU90TsSUftZVCy7lpHQJUfrdWbqY9Voz87D3SuFx0xJYy89ocJY1AI6QiXqoS10hu+ Jd55BGhwt5s5hAk77LNA6KvsQmkuL131csDPx6WKL5EZj+6nYSabsl84+E8xmPNwezTF o0tg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10si1516820pgd.329.2018.02.02.06.27.40; Fri, 02 Feb 2018 06:27:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751469AbeBBO0z (ORCPT + 99 others); Fri, 2 Feb 2018 09:26:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:50684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589AbeBBO0t (ORCPT ); Fri, 2 Feb 2018 09:26:49 -0500 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DFAB52178E; Fri, 2 Feb 2018 14:26:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFAB52178E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Received: by jouet.infradead.org (Postfix, from userid 1000) id 3DC5D141E4A; Fri, 2 Feb 2018 11:26:38 -0300 (-03) Date: Fri, 2 Feb 2018 11:26:38 -0300 From: Arnaldo Carvalho de Melo To: kan.liang@intel.com Cc: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, wangnan0@huawei.com, jolsa@kernel.org, namhyung@kernel.org, ak@linux.intel.com, yao.jin@linux.intel.com Subject: Re: [PATCH V5 12/17] perf evsel: expose perf_missing_features.write_backward Message-ID: <20180202142638.GC26905@kernel.org> References: <1516310792-208685-1-git-send-email-kan.liang@intel.com> <1516310792-208685-13-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516310792-208685-13-git-send-email-kan.liang@intel.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jan 18, 2018 at 01:26:27PM -0800, kan.liang@intel.com escreveu: > From: Kan Liang > > perf top need it to handle overwrite fallback later. > > Signed-off-by: Kan Liang > --- > tools/perf/util/evsel.c | 5 +++++ > tools/perf/util/evsel.h | 2 ++ > 2 files changed, 7 insertions(+) > > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c > index 4eea3b4..1dd3700 100644 > --- a/tools/perf/util/evsel.c > +++ b/tools/perf/util/evsel.c > @@ -1670,6 +1670,11 @@ static bool ignore_missing_thread(struct perf_evsel *evsel, > return true; > } > > +bool is_write_backward_fail(void) > +{ > + return perf_missing_features.write_backward; > +} > + Humm, I think we better expose perf_missing_features, i.e. tools using if (perf_missing_features.write_backward) looks more clear than: if (is_write_backward_fail()) This is minor, so I'm doing this myself, please holler if you disagree. - Arnaldo > int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus, > struct thread_map *threads) > { > diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h > index 846e416..1f46728 100644 > --- a/tools/perf/util/evsel.h > +++ b/tools/perf/util/evsel.h > @@ -448,4 +448,6 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr, > > struct perf_env *perf_evsel__env(struct perf_evsel *evsel); > > +bool is_write_backward_fail(void); > + > #endif /* __PERF_EVSEL_H */ > -- > 2.5.5