From patchwork Wed Sep 23 11:22:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 54048 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id E8DAC22E14 for ; Wed, 23 Sep 2015 11:27:42 +0000 (UTC) Received: by wicmn1 with SMTP id mn1sf22622641wic.1 for ; Wed, 23 Sep 2015 04:27:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=aBM+01rQ8DytSscniLXXD1E6TsEJo9B5hmDYFHw2Vlw=; b=ReYc8THFeQv9T/hXU+tj8Q+RMXvmN5R8+g5tzId4h9wT4Mrft4/Uy6qvs0JCB2WY/s LSdZ+Jb56tTDQ2It1q3fK3R+fWqhlnWeIA2WKmiIma86eSAyPuuq7/QBzyW31wKlRlPt aNn8PEmC+fgMUS07HpPrcBcb84VzC3r/PiXQ0DKCDRcG8GIQ9Ja2qZ/weVuCp3i4vnfG /9Ssub+z1oO/rK41CL4HY/rhAaD9tWdPEYvEkugKt3iUDFt14neHsPPcgK9hYtHGIQLL yypMtPmIE8kcz73v9ag5QOhnRcWzuh9iG3H0EBSbC6g0cBF7/NnSU1D3VP+YSLy9b9iU 2XBw== X-Gm-Message-State: ALoCoQl2ZIp+nPBoGrRNaw78g0W196/ViiFC7HuDgXXaQNqEBeaBE+SXLDgooMPaSFVg5ejmKtPb X-Received: by 10.152.26.5 with SMTP id h5mr5197552lag.5.1443007662158; Wed, 23 Sep 2015 04:27:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.229 with SMTP id q5ls30159lae.17.gmail; Wed, 23 Sep 2015 04:27:42 -0700 (PDT) X-Received: by 10.152.44.132 with SMTP id e4mr11185587lam.3.1443007661989; Wed, 23 Sep 2015 04:27:41 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id f139si2605795lfb.79.2015.09.23.04.27.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2015 04:27:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lagj9 with SMTP id j9so46442339lag.2 for ; Wed, 23 Sep 2015 04:27:41 -0700 (PDT) X-Received: by 10.25.210.206 with SMTP id j197mr3759800lfg.86.1443007661815; Wed, 23 Sep 2015 04:27:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1045199lbq; Wed, 23 Sep 2015 04:27:40 -0700 (PDT) X-Received: by 10.68.219.194 with SMTP id pq2mr36302680pbc.20.1443007660697; Wed, 23 Sep 2015 04:27:40 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rb8si9879137pbb.243.2015.09.23.04.27.40; Wed, 23 Sep 2015 04:27:40 -0700 (PDT) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754750AbbIWL1i (ORCPT + 30 others); Wed, 23 Sep 2015 07:27:38 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:19540 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754393AbbIWLXn (ORCPT ); Wed, 23 Sep 2015 07:23:43 -0400 Received: from 172.24.1.47 (EHLO szxeml426-hub.china.huawei.com) ([172.24.1.47]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CTE39091; Wed, 23 Sep 2015 19:23:22 +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; Wed, 23 Sep 2015 19:23:13 +0800 From: Wang Nan To: CC: , , He Kuang , Wang Nan , Alexei Starovoitov , Brendan Gregg , "Daniel Borkmann" , David Ahern , Jiri Olsa , Kaixu Xia , Masami Hiramatsu , Namhyung Kim , "Paul Mackerras" , Peter Zijlstra , Zefan Li Subject: [PATCH 18/22] perf record: Support custom vmlinux path Date: Wed, 23 Sep 2015 11:22:39 +0000 Message-ID: <1443007363-124182-19-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1443007363-124182-1-git-send-email-wangnan0@huawei.com> References: <1443007363-124182-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangnan0@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: He Kuang Make perf-record command support --vmlinux option if BPF_PROLOGUE is on. 'perf record' needs vmlinux as the source of DWARF info to generate prologue for BPF programs, so path of vmlinux should be specified. Short name 'k' has been taken by 'clockid'. This patch skips the short option name and use '--vmlinux' for vmlinux path. Signed-off-by: He Kuang Signed-off-by: Wang Nan Cc: Alexei Starovoitov Cc: Brendan Gregg Cc: Daniel Borkmann Cc: David Ahern Cc: He Kuang Cc: Jiri Olsa Cc: Kaixu Xia Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3orama@163.com Cc: Arnaldo Carvalho de Melo Link: http://lkml.kernel.org/n/ebpf-6yw9eg0ej3l4jnqhinngkw86@git.kernel.org --- tools/perf/builtin-record.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index ea3eef6..a0c8ef8 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -1102,6 +1102,10 @@ struct option __record_options[] = { "clang binary to use for compiling BPF scriptlets"), OPT_STRING(0, "clang-opt", &llvm_param.clang_opt, "clang options", "options passed to clang when compiling BPF scriptlets"), +#ifdef HAVE_BPF_PROLOGUE + OPT_STRING(0, "vmlinux", &symbol_conf.vmlinux_name, + "file", "vmlinux pathname"), +#endif #endif OPT_END() };