From patchwork Sat Aug 29 04:22:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 52824 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 0A4F420503 for ; Sat, 29 Aug 2015 04:24:27 +0000 (UTC) Received: by wibcx1 with SMTP id cx1sf2675575wib.3 for ; Fri, 28 Aug 2015 21:24:26 -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=EhE8Ura/6VpiHjwmgQPM+YQzvTBZJHkvGgvusYaiLVk=; b=KWncqjIjGIvMjDRzO79Rbibr4vyv9beIsgqdtwcmCFCCgCEBHd6b5U4GRj4LTdhKTS WtbaqFnZglUApYhMxqxSFEs1P+Pa//4n0WCcJUA0ZaUZ3xUYuXbPiZz6OB5ug5oKQu7R lJY/6Wu7uELzWHPRiw3IKN+sEUh90R1gm0jYfpZbGpmLAtGd0YNcJohP6AKTFOFb9qiG Rvm/0//dlMdMf+Jrw/sg2GvmGXYud9/bPWDeJxexSHl1gxsyMVA1/kWZliHmjP0DWuyv tLqmG+C3Cj7vF5YI2Oc5N14HpNSaI/IwPwye3Sif+LgcXFxTxXVWwlr3tPV4l/iXrQEP 6hzA== X-Gm-Message-State: ALoCoQna3p7ZkDf5os6YVLnAZoODaatkoGjoZ9jq79uWNud9n6ZNjsRrEyrH8sGZyYi5tBHlac3a X-Received: by 10.152.6.229 with SMTP id e5mr3539973laa.5.1440822266267; Fri, 28 Aug 2015 21:24:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.226 with SMTP id e2ls284412laa.108.gmail; Fri, 28 Aug 2015 21:24:25 -0700 (PDT) X-Received: by 10.112.16.73 with SMTP id e9mr6243737lbd.65.1440822265959; Fri, 28 Aug 2015 21:24:25 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id k3si7654379laf.118.2015.08.28.21.24.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Aug 2015 21:24:25 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by laboe4 with SMTP id oe4so17413122lab.0 for ; Fri, 28 Aug 2015 21:24:25 -0700 (PDT) X-Received: by 10.112.166.2 with SMTP id zc2mr6055862lbb.29.1440822265796; Fri, 28 Aug 2015 21:24:25 -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.151.194 with SMTP id us2csp267595lbb; Fri, 28 Aug 2015 21:24:24 -0700 (PDT) X-Received: by 10.66.160.1 with SMTP id xg1mr20412392pab.27.1440822264666; Fri, 28 Aug 2015 21:24:24 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ue3si13334131pab.213.2015.08.28.21.24.22; Fri, 28 Aug 2015 21:24:24 -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 S1752736AbbH2EYK (ORCPT + 28 others); Sat, 29 Aug 2015 00:24:10 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:6382 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752634AbbH2EYH (ORCPT ); Sat, 29 Aug 2015 00:24:07 -0400 Received: from 172.24.1.51 (EHLO szxeml431-hub.china.huawei.com) ([172.24.1.51]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CRK01395; Sat, 29 Aug 2015 12:23:28 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by szxeml431-hub.china.huawei.com (10.82.67.208) with Microsoft SMTP Server id 14.3.235.1; Sat, 29 Aug 2015 12:23:20 +0800 From: Wang Nan To: , , CC: , , , He Kuang , Wang Nan , Brendan Gregg , Daniel Borkmann , "David Ahern" , Jiri Olsa , Kaixu Xia , Masami Hiramatsu , Namhyung Kim , Paul Mackerras , Peter Zijlstra Subject: [PATCH 27/31] perf record: Support custom vmlinux path Date: Sat, 29 Aug 2015 04:22:01 +0000 Message-ID: <1440822125-52691-28-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1440822125-52691-1-git-send-email-wangnan0@huawei.com> References: <1440822125-52691-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.50 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/1436445342-1402-38-git-send-email-wangnan0@huawei.com --- 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 212718c..8eb39d5 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -1100,6 +1100,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() };