Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932863AbbFIFxb (ORCPT ); Tue, 9 Jun 2015 01:53:31 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:63417 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932286AbbFIFvf (ORCPT ); Tue, 9 Jun 2015 01:51:35 -0400 From: Wang Nan To: , , , , , , , , , , CC: , , , , Subject: [RFC PATCH v6 32/32] perf record: Add LLVM options for compiling BPF scripts Date: Tue, 9 Jun 2015 05:50:36 +0000 Message-ID: <1433829036-23687-33-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1433829036-23687-1-git-send-email-wangnan0@huawei.com> References: <1433829036-23687-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.197.200] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1557 Lines: 37 Although previous patch allows setting BPF compiler related options in perfconfig, on some ad-hoc situation it still requires passing options through cmdline. This patch introduces 4 options to 'perf record' for this propose: --clang-path, --clang-opt, --llc-path and --llc-opt. Signed-off-by: Wang Nan --- tools/perf/builtin-record.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 235c3d9..ad5892e 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -1070,6 +1070,14 @@ struct option __record_options[] = { parse_clockid), OPT_STRING_OPTARG('S', "snapshot", &record.opts.auxtrace_snapshot_opts, "opts", "AUX area tracing Snapshot Mode", ""), + OPT_STRING(0, "clang-path", &bpf_param.clang_path, "clang patch", + "clang binary to use for compiling BPF scriptlets"), + OPT_STRING(0, "clang-opt", &bpf_param.clang_opt, "clang options", + "options passed to clang when compiling BPF scriptlets"), + OPT_STRING(0, "llc-path", &bpf_param.llc_path, "llc path", + "llc binary to use for compiling BPF scriptlets"), + OPT_STRING(0, "llc-opt", &bpf_param.llc_opt, "llc opt", + "options passed to llc when compiling BPF scriptlets"), OPT_END() }; -- 1.8.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/