From patchwork Thu Feb 25 08:51:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 62860 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp47787lbc; Thu, 25 Feb 2016 00:53:41 -0800 (PST) X-Received: by 10.66.228.97 with SMTP id sh1mr54108826pac.77.1456390421104; Thu, 25 Feb 2016 00:53:41 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tx10si11114517pac.146.2016.02.25.00.53.40; Thu, 25 Feb 2016 00:53:41 -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 S1760177AbcBYIxj (ORCPT + 30 others); Thu, 25 Feb 2016 03:53:39 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:38802 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760050AbcBYIwb (ORCPT ); Thu, 25 Feb 2016 03:52:31 -0500 Received: from 172.24.1.49 (EHLO szxeml426-hub.china.huawei.com) ([172.24.1.49]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BWO98101; Thu, 25 Feb 2016 16:52:15 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.235.1; Thu, 25 Feb 2016 16:52:01 +0800 From: Wang Nan To: , CC: , Wang Nan , "Arnaldo Carvalho de Melo" , Li Zefan , Subject: [RFC PATCH 1/5] perf trace: Apply config options in '.perfconfig' Date: Thu, 25 Feb 2016 08:51:51 +0000 Message-ID: <1456390315-127562-2-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1456390315-127562-1-git-send-email-wangnan0@huawei.com> References: <1456390315-127562-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.56CEC0C1.00DB, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: d96831342aa2207c0cb466f80eaf3b35 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'perf trace' doesn't read and apply options in ~/.perfconfig. If a BPF script is passed to 'perf trace --ev' and clang is not in $PATH, perf trace doesn't compile the script even clang-path is configured in ~/.perfconfig. This patch makes 'perf trace' read and apply default config options from that file. Signed-off-by: Wang Nan Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Li Zefan Cc: pi3orama@163.com --- tools/perf/builtin-trace.c | 2 ++ 1 file changed, 2 insertions(+) -- 1.8.3.4 diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 20916dd..6c52f3c 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -3108,6 +3108,8 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused) goto out; } + perf_config(perf_default_config, NULL); + argc = parse_options_subcommand(argc, argv, trace_options, trace_subcommands, trace_usage, PARSE_OPT_STOP_AT_NON_OPTION);