From patchwork Wed Oct 14 12:41:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 54932 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id B17F923012 for ; Wed, 14 Oct 2015 12:46:25 +0000 (UTC) Received: by wibzt1 with SMTP id zt1sf26792476wib.0 for ; Wed, 14 Oct 2015 05:46:25 -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=+DcZ3BFtE3X0aWPFept0i1Z4PmV4D7RR5cbq4Fjiq4Y=; b=PTgNIh1t5izxl8jNb7BivLarmBqrHFf7UT+VlaoXVVBJZKP353wFaHZH2iE+BW19vj XdGm7IusAmgiBZOVvpm4QCLi4ouih5M530ImhmBNMr4cfegkiuFWYjgtiypbA2YpWmUA sZfhHByrZBpuSQj0divg8oQ8ckZVc9+M+aZ+xY6L385AlZNWmUP3Fe0f1OlrF+YWqgtS winlEmTEHRLBjQKqT8UvG9Mn9cBLfSpVwMw7Rl1BrLO0Zq3E1T+5Ca69XXx5zJujsjP0 5wanoty4NcB6vC7gQk91mGza1XgHE1lXYeZjML92saRdXDXzOa2g3Th052r0fGdC5pcC M/qA== X-Gm-Message-State: ALoCoQmIuCHYX8MTHbetbqo4jqAA3HmKwPfxqy8ooz7xpX7N3pujnh5p2d+6iDcA5byHNPrx/uPr X-Received: by 10.112.198.33 with SMTP id iz1mr724983lbc.8.1444826784961; Wed, 14 Oct 2015 05:46:24 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.153.196 with SMTP id b187ls36729lfe.80.gmail; Wed, 14 Oct 2015 05:46:24 -0700 (PDT) X-Received: by 10.112.198.97 with SMTP id jb1mr1495986lbc.8.1444826784792; Wed, 14 Oct 2015 05:46:24 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id p79si5446516lfb.76.2015.10.14.05.46.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 05:46:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbwr8 with SMTP id r8so45077218lbw.2 for ; Wed, 14 Oct 2015 05:46:24 -0700 (PDT) X-Received: by 10.112.129.202 with SMTP id ny10mr1464591lbb.112.1444826784433; Wed, 14 Oct 2015 05:46:24 -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 w3csp2711393lbq; Wed, 14 Oct 2015 05:46:23 -0700 (PDT) X-Received: by 10.68.222.163 with SMTP id qn3mr3671638pbc.54.1444826783346; Wed, 14 Oct 2015 05:46:23 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kj7si13103695pab.5.2015.10.14.05.46.23; Wed, 14 Oct 2015 05:46:23 -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 S932393AbbJNMqO (ORCPT + 30 others); Wed, 14 Oct 2015 08:46:14 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:50407 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753626AbbJNMm6 (ORCPT ); Wed, 14 Oct 2015 08:42:58 -0400 Received: from 172.24.1.48 (EHLO szxeml425-hub.china.huawei.com) ([172.24.1.48]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CWT05961; Wed, 14 Oct 2015 20:42:37 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by szxeml425-hub.china.huawei.com (10.82.67.180) with Microsoft SMTP Server id 14.3.235.1; Wed, 14 Oct 2015 20:42:27 +0800 From: Wang Nan To: , , CC: , , , , , , , , , , , , Wang Nan , Arnaldo Carvalho de Melo Subject: [PATCH 19/31] perf record: Support custom vmlinux path Date: Wed, 14 Oct 2015 12:41:30 +0000 Message-ID: <1444826502-49291-20-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1444826502-49291-1-git-send-email-wangnan0@huawei.com> References: <1444826502-49291-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.217.172 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 847cc67..200f221 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -1123,6 +1123,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() };