Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5206841imb; Thu, 7 Mar 2019 10:02:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxnbJS1UBCweOhpPLA10ELSA6nYKrP/o9x4PtNeUxECkyaUfRTnuwUICSu4iTAi4r4VQMTv X-Received: by 2002:a62:4815:: with SMTP id v21mr13704993pfa.167.1551981775597; Thu, 07 Mar 2019 10:02:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551981775; cv=none; d=google.com; s=arc-20160816; b=N0e+O6SsOt3RPMaWCSbC9qUIbEwcgcfbzQCmOVQ2ZKPSttErzc64BZf+4nLGU79ju/ ZXATB0nGkuq0nWwmdwiMt2Dy9Y2jycsj9K1i/yvTqG+Zg9mOpxwIIIthzyXjfZU/SllR re+JQV//MW7BM76VOCVvqA7sj302AYVZrlJ3ltvNhcaL6/8k/keSe+T1gX0sbtKGaLUc yl6vVwtai6oAhwvin95UxlIBuwXIoid7wF/nrgmvF+EjB28T/PsYGLrKIfUgUh9d57Wq RGUFP88yPT2bHr2mm9RlJeipDr7BpFY3SWEm0mElWFpnVBkn25J/AsFPcrjt6eoJVFyI Z8GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:smtp-origin-cluster:cc:to :smtp-origin-hostname:from:smtp-origin-hostprefix:dkim-signature; bh=v4CFG6GAoKDdVvUtX74CjwljSMlGo1gNsqjCsZJtPw0=; b=lBrsx97cSJLXzg+JHhx+KVt6ui45+gXU8ILjmmGkoeIasLkmLL6VroibR4WOjoOFwD 2Yi4tlP3VqVhxTVz2pdOoIAW9KCtuRE98imh6PIyJCNHQ2DI1j2j+t9c5AAlIkdjjBjE JFaH+q1wkQ+d2zSucyqOczBu0ypxJjFRPCWHdFlb8uAVGtAZ57Awk2e9udFqgbDEnGEa 9WPgoBIoeYuHfDN90lWOlw77ZcZaGXrxGiJnIJU3TyFK2wZ157Z+ENEk9c/79uPNlZAN pzHxbBWkB9ZLZ1CDSgIwuXhIpJDaLcQSCAGEbaf4j8GQb7XaMU8tc4JJWoCw3YWZ/WYO +Z6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=rO98Ekcu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j64si4182975pge.260.2019.03.07.10.02.39; Thu, 07 Mar 2019 10:02:55 -0800 (PST) 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; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=rO98Ekcu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726542AbfCGSCT (ORCPT + 99 others); Thu, 7 Mar 2019 13:02:19 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:53532 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726491AbfCGSCT (ORCPT ); Thu, 7 Mar 2019 13:02:19 -0500 Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x27I0H8h018751 for ; Thu, 7 Mar 2019 10:02:18 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=v4CFG6GAoKDdVvUtX74CjwljSMlGo1gNsqjCsZJtPw0=; b=rO98Ekcu+2J32ZhtOxdIhXN+aCcvcAr79D+PhYe2JKwA5/z+gnjVWbQjuIsCyZfsT2KP ggJP5UJD9JptF+GXWq8D3e25A4Q1wEK6CTdoVhu6PqugxEp6LCcJ2PcaUgbVXTCAQBDt JM0OF9Yf2wZTPawsbKJO+VfXITZC21GDB8A= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0b-00082601.pphosted.com with ESMTP id 2r35sd0kef-12 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 07 Mar 2019 10:02:17 -0800 Received: from mx-out.facebook.com (2620:10d:c081:10::13) by mail.thefacebook.com (2620:10d:c081:35::127) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1713.5; Thu, 7 Mar 2019 09:58:37 -0800 Received: by devbig006.ftw2.facebook.com (Postfix, from userid 4523) id ADF1B62E1750; Thu, 7 Mar 2019 09:58:35 -0800 (PST) Smtp-Origin-Hostprefix: devbig From: Song Liu Smtp-Origin-Hostname: devbig006.ftw2.facebook.com To: , , CC: , , , , , , , Song Liu Smtp-Origin-Cluster: ftw2c04 Subject: [PATCH v7 perf,bpf 10/15] perf-top: add option --no-bpf-event Date: Thu, 7 Mar 2019 09:58:05 -0800 Message-ID: <20190307175810.249857-11-songliubraving@fb.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190307175810.249857-1-songliubraving@fb.com> References: <20190307175810.249857-1-songliubraving@fb.com> X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-07_09:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org bpf events should be tracked by default for perf-top. This patch makes it on by default, and adds option to disable bpf events. Signed-off-by: Song Liu --- tools/perf/builtin-top.c | 3 +++ tools/perf/util/top.h | 1 + 2 files changed, 4 insertions(+) diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 27d8d42e0a4d..ccdf5689452f 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1492,6 +1492,7 @@ int cmd_top(int argc, const char **argv) "Display raw encoding of assembly instructions (default)"), OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel, "Enable kernel symbol demangling"), + OPT_BOOLEAN(0, "no-bpf-event", &top.no_bpf_event, "do not record bpf events"), OPT_STRING(0, "objdump", &top.annotation_opts.objdump_path, "path", "objdump binary to use for disassembly and annotations"), OPT_STRING('M', "disassembler-style", &top.annotation_opts.disassembler_style, "disassembler style", @@ -1651,6 +1652,8 @@ int cmd_top(int argc, const char **argv) signal(SIGWINCH, winch_sig); } + top.record_opts.bpf_event = !top.no_bpf_event; + status = __cmd_top(&top); out_delete_evlist: diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h index 19f95eaf75c8..862a37bd27ea 100644 --- a/tools/perf/util/top.h +++ b/tools/perf/util/top.h @@ -32,6 +32,7 @@ struct perf_top { bool use_tui, use_stdio; bool vmlinux_warned; bool dump_symtab; + bool no_bpf_event; struct hist_entry *sym_filter_entry; struct perf_evsel *sym_evsel; struct perf_session *session; -- 2.17.1