Received: by 10.223.176.5 with SMTP id f5csp833183wra; Fri, 2 Feb 2018 06:54:28 -0800 (PST) X-Google-Smtp-Source: AH8x225xBCpbjqsi96eKOZZ3hiVCdD4ncD0P/UOKdYA31/Itpq40nGrDJGA01WVrhlgRqvLBXQ/z X-Received: by 10.98.61.208 with SMTP id x77mr41257326pfj.2.1517583268581; Fri, 02 Feb 2018 06:54:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517583268; cv=none; d=google.com; s=arc-20160816; b=kmIIkY4xwiGkmRc7KLHiC9F4PaJbEOzyUc1Fv5v/3370nRaf3jkDdmXv8wdv4CrOTR LSGJ1IyPKBR881iIjdsqffWgW4XELlnrbS+AL8znmoQyjdixwmlZITfxQqxu7XYZ5WSB Uy8SBnDsGV3E6jHHqEK2YLpoLajKizg9qG09UOQb9+PKXiBFEuT8Vfj8up7TPk7vWXNY gT0ZoUfmVyHMvQHVRd2MzatU4lkqUaayF/jqAc78435ZiTWAIj6/O8OkpYxA/h7O53hG B44CfBQcHQ4yFLtJmBIvLmr2njqKHiMxdYQ7vtp0s0C1wIOO+55ni7NsNvJ5LTzhYRnp hWEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=6snFpvkUlfy4xYSLasEuk+17aXUW/4iEfnr9vg1O1EE=; b=JBCoYH2VOVvr3Tgwz7LkafMA3I/DKtr+o5JVEI9tWziIr32U8/Qv3Qbuk2T8L1AAri cBpbv0d/jejJaPCH5YWxzEGI0d8aZ4U3B8/8S0pljNm6Md30bwWUpkvwphRbK0EPdUj6 eD+UV0uISnZ39nl1fe6HUHtg8/I1d2P8I7y1z/Wgqw9yFfnBLZQ/HFZ9UKrr+dSd2+Ve lfH3sK9fYez0dvH9Ssmo4xYFNhlIXM7MMuoQr32mMKy90xAxbzDZVajwzHi/u2thsoKH XBSN0uQhf+pPDZ19EumZlr/ll8lv1PLQbyxuKtwULRqk7HQEMqPISqTZ0be9Re1/TYjq 27wQ== 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 94-v6si1925750ple.298.2018.02.02.06.54.12; Fri, 02 Feb 2018 06:54:28 -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 S1752166AbeBBOxu convert rfc822-to-8bit (ORCPT + 99 others); Fri, 2 Feb 2018 09:53:50 -0500 Received: from mga04.intel.com ([192.55.52.120]:35423 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751643AbeBBOxp (ORCPT ); Fri, 2 Feb 2018 09:53:45 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Feb 2018 06:53:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,448,1511856000"; d="scan'208";a="171166997" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 02 Feb 2018 06:53:44 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 2 Feb 2018 06:53:44 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.130]) with mapi id 14.03.0319.002; Fri, 2 Feb 2018 22:53:42 +0800 From: "Liang, Kan" To: Arnaldo Carvalho de Melo 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 Thread-Topic: [PATCH V5 12/17] perf evsel: expose perf_missing_features.write_backward Thread-Index: AQHTkKM1a8KwiOsTq0WQ+0cXwu++jaOQvEkAgACKakA= Date: Fri, 2 Feb 2018 14:53:42 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F07753826CC8@SHSMSX103.ccr.corp.intel.com> References: <1516310792-208685-1-git-send-email-kan.liang@intel.com> <1516310792-208685-13-git-send-email-kan.liang@intel.com> <20180202142638.GC26905@kernel.org> In-Reply-To: <20180202142638.GC26905@kernel.org> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmIwZmY5NWQtMDg1ZC00Yjc3LWJiMTItNTI1MmIwYzU4NWVjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InBLNHRBTjkxT2hzZlRkNUgwbkliK0c4TVFaMkMrSHAxTFpmd1lQNXhFblk9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 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) > It looks good. Thanks a lot. Kan > 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