From patchwork Sun Sep 6 07:13: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: 53185 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id DB24C22B05 for ; Sun, 6 Sep 2015 07:18:53 +0000 (UTC) Received: by laeb10 with SMTP id b10sf19031486lae.1 for ; Sun, 06 Sep 2015 00:18:52 -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=K6K/P0otyG8ovvArH8LVhlQTmsEJ68BtIRGuCtcEO/Q=; b=lRbG3ycQ7TNUE8haGbI6OSDybZzlFRuaF2WfGdhQqtyJaK/lA5ypmxn/MxmUc0GODk MfzmZe57ACC4gwz0qvt2wdzjrYZ/htjlfHJ+R1TqxnffkrrAOVu3dGwUoMn6IAkN8IwI TOq1Ol4SpfeUyIRP9AbUa9f5G9iMNfZZmg7OysrwkGa2eXO16Bg+Ftb64BRCW2ZVqVJt 6EHHKR8vbXBPLmnwsufCsVmfv/IuIRWRzUtQkep1f0wbrXVtc+l2DPX9vkly3AEb23lo 5lywFIO+XBsVNTJn43aXQLGyx4bvtRDCwWvvSgvt/m4xivbb3kZ/UKODlvbaz0fm6CrM 5fFw== X-Gm-Message-State: ALoCoQnbsFxA9P/OLAwY+58+yWQ/LOd71K54v/Bhv1Fg6Y7Spw0xx5tNDTOAKN+lq01C5A4xZMOw X-Received: by 10.194.80.69 with SMTP id p5mr3342176wjx.2.1441523932802; Sun, 06 Sep 2015 00:18:52 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.67 with SMTP id da3ls76658lad.71.gmail; Sun, 06 Sep 2015 00:18:52 -0700 (PDT) X-Received: by 10.152.9.9 with SMTP id v9mr11312259laa.111.1441523932609; Sun, 06 Sep 2015 00:18:52 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id j3si7247687lae.6.2015.09.06.00.18.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Sep 2015 00:18:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lamp12 with SMTP id p12so34703759lam.0 for ; Sun, 06 Sep 2015 00:18:52 -0700 (PDT) X-Received: by 10.112.141.136 with SMTP id ro8mr11793762lbb.88.1441523932496; Sun, 06 Sep 2015 00:18:52 -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.164.42 with SMTP id yn10csp844647lbb; Sun, 6 Sep 2015 00:18:51 -0700 (PDT) X-Received: by 10.68.135.66 with SMTP id pq2mr30309881pbb.29.1441523931308; Sun, 06 Sep 2015 00:18:51 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cg6si13780958pad.123.2015.09.06.00.18.50; Sun, 06 Sep 2015 00:18:51 -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 S1753109AbbIFHSs (ORCPT + 28 others); Sun, 6 Sep 2015 03:18:48 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:7752 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751498AbbIFHOq (ORCPT ); Sun, 6 Sep 2015 03:14:46 -0400 Received: from 172.24.1.48 (EHLO SZXEML423-HUB.china.huawei.com) ([172.24.1.48]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CUK94079; Sun, 06 Sep 2015 15:14:26 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by SZXEML423-HUB.china.huawei.com (10.82.67.154) with Microsoft SMTP Server id 14.3.235.1; Sun, 6 Sep 2015 15:14:16 +0800 From: Wang Nan To: , , , CC: , , , , , , , , , , , Subject: [PATCH 23/27] perf record: Support custom vmlinux path Date: Sun, 6 Sep 2015 07:13:39 +0000 Message-ID: <1441523623-152703-24-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1441523623-152703-1-git-send-email-wangnan0@huawei.com> References: <1441523623-152703-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.45 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 11e7d63..43ff231 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -1103,6 +1103,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() };