Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1451110imc; Mon, 11 Mar 2019 14:10:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBpZhAQKsyY09KQL1RiUtjplNDQsqLZlc7Xvm/8sMUCOHOKksKNNjeT2ri0CRQk1t93bmd X-Received: by 2002:a62:11ca:: with SMTP id 71mr34724469pfr.18.1552338618934; Mon, 11 Mar 2019 14:10:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552338618; cv=none; d=google.com; s=arc-20160816; b=f7WUKSQv68OXOqdTL1MMqYjsFGyWl0W19rxFGV11d5DclQNHLt6+Pw3dRjnhoIayDg rMSi5C99NyqiUZeRhQLu6BMn+/J7uAI8RblYyPlIVXF4I5XcsefV1yfqWd3UBzJpBqLN E2R7I7qB7bVqPG5dlgkkP70/AUxiRyPMlS83duCCTOldNhOfFfbVJ5zEKP+pDQxFBx8B sta0mKBdFYrps4/w8jpsBj3SFZZHYaOTg7G+E/1EpF3c+lmRxI1uq87DjIBO+0at1NAE BO9dxvhV0jtwt3rh8Y1hUG8TbUbCiZ6KW3xDqbj/plfb0G8xNU9c4OF0BtcTami5qyVj Ropw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:dkim-signature; bh=4j4QWybr7DJ05K6Z1nzQSSIN5bBKoGD4rriqHhpDcVE=; b=QtvmDLvvAA3cCDjsx2Dyty5VSpmonYuAw19lfw9zXA1ykYjw1rDf3oVZk0LZ+0+yPZ OMJ6YykZzNyqm/YdTwampNRB6ExXXlrKQG5M0yGtT3R8DCUaCHbYH773A4sxlQGLBLvc 6/xPui27/mfBMhK5N6me00H2NfWaHUBOY18JHpwh7anIWiPrJSslfo6m05WIdQVgLL3V Xc/L9bow1qrQ/dt5lPfwG9Xi8rLqK3cJuGpsTFIa+RUt3b8s1OZtZ699PLU2dzK/H36s mDd8ei1vAil9gd72Q4gign4KIVIEmwBVZeUHhcljouRt0a1oiqSgmexVy+eYpvxTkcuH uC/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=HpfEKEGH; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=Zj3KqAoq; 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 o17si5984255pll.344.2019.03.11.14.10.03; Mon, 11 Mar 2019 14:10:18 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=HpfEKEGH; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=Zj3KqAoq; 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 S1728351AbfCKVIY (ORCPT + 99 others); Mon, 11 Mar 2019 17:08:24 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:58176 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727794AbfCKVIX (ORCPT ); Mon, 11 Mar 2019 17:08:23 -0400 Received: from pps.filterd (m0044010.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2BL5xgE014739; Mon, 11 Mar 2019 14:07:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=facebook; bh=4j4QWybr7DJ05K6Z1nzQSSIN5bBKoGD4rriqHhpDcVE=; b=HpfEKEGHY7UNNIpiRhcchWoOVPUwGVjmups4Pye6k33rCM9qJGMskt0luigu9v0JMgjT jiEs+RGY9UipI4eM+lFtHs2cXDrLD1eygDRDms8ELAAHEysh4qcQimAhybwpcTFhom9h mJXxrGk35iOaCjmu4nrUxFAAci7tcRjDh9k= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2r5w3srfsv-11 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 11 Mar 2019 14:07:54 -0700 Received: from frc-hub04.TheFacebook.com (2620:10d:c021:18::174) by frc-hub04.TheFacebook.com (2620:10d:c021:18::174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1713.5; Mon, 11 Mar 2019 14:07:22 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1713.5 via Frontend Transport; Mon, 11 Mar 2019 14:07:22 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4j4QWybr7DJ05K6Z1nzQSSIN5bBKoGD4rriqHhpDcVE=; b=Zj3KqAoq9Dn5DUkaCE2VGJIbeQs+tid3SPBeqGkFqelTIU3rmZr1LCmDMuNXC+lfZSJv1yHQrwqnzWN9vEctZ2D+WSK9weMahFJIU+cQ1/oE5RV4BOKqOh9V+YNOu7TkIVu3Ma2iqdugBqh1LWMZI/fKBFrtm2MWThgi0ddqNwg= Received: from MWHPR15MB1165.namprd15.prod.outlook.com (10.175.2.19) by MWHPR15MB1888.namprd15.prod.outlook.com (10.174.100.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.20; Mon, 11 Mar 2019 21:07:20 +0000 Received: from MWHPR15MB1165.namprd15.prod.outlook.com ([fe80::f190:6de5:7e3:e065]) by MWHPR15MB1165.namprd15.prod.outlook.com ([fe80::f190:6de5:7e3:e065%6]) with mapi id 15.20.1686.021; Mon, 11 Mar 2019 21:07:20 +0000 From: Song Liu To: "bpf@vger.kernel.org" , Networking , linux-kernel CC: Alexei Starovoitov , Daniel Borkmann , Kernel Team , "peterz@infradead.org" , "acme@redhat.com" , "jolsa@kernel.org" , "namhyung@kernel.org" , "sdf@fomichev.me" Subject: Re: [PATCH v8 perf,bpf 10/15] perf-top: add option --no-bpf-event Thread-Topic: [PATCH v8 perf,bpf 10/15] perf-top: add option --no-bpf-event Thread-Index: AQHU2EShDF9NwauXz0Ol5cObQ7QoIqYG7EmA Date: Mon, 11 Mar 2019 21:07:20 +0000 Message-ID: References: <20190311195555.889995-1-songliubraving@fb.com> <20190311195555.889995-11-songliubraving@fb.com> In-Reply-To: <20190311195555.889995-11-songliubraving@fb.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3445.102.3) x-originating-ip: [2620:10d:c090:200::2:e2c1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a296df23-440a-4797-bfe8-08d6a6658cb7 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:MWHPR15MB1888; x-ms-traffictypediagnostic: MWHPR15MB1888: x-microsoft-exchange-diagnostics: 1;MWHPR15MB1888;20:0Q1KwYq2rO+AYqwL1yTp/DepjTWNLESsTJrQ8r4A5XzOui4u0zgGB7z4mvCjIKU9M5mDbjIpbSFMwG5gOil69HxnexLZ2rj9m/NTQiOlrsm3KKEqb6lV2Xl9pk2XsYTjdSiSvui+i6qIIchxlTJPU6pinnRdVIAAwqCZjDD6aG0= x-microsoft-antispam-prvs: x-forefront-prvs: 09730BD177 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(376002)(346002)(39860400002)(136003)(366004)(189003)(199004)(2906002)(50226002)(71190400001)(71200400001)(2501003)(8936002)(110136005)(478600001)(6486002)(4326008)(6116002)(229853002)(54906003)(57306001)(86362001)(97736004)(83716004)(14454004)(316002)(256004)(14444005)(25786009)(82746002)(186003)(99286004)(486006)(7416002)(102836004)(6512007)(6246003)(33656002)(2616005)(476003)(11346002)(7736002)(6436002)(76176011)(53546011)(36756003)(105586002)(305945005)(8676002)(68736007)(81166006)(5660300002)(81156014)(446003)(53936002)(46003)(6506007)(106356001)(142933001);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR15MB1888;H:MWHPR15MB1165.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 4iU0uaN8rf61UFlg2BaqYlaH6lDcaLLOoGexb6DUH6Vt8Jpv0/AS5bQgpxOmwyzpUJnFox7p5BxOj2cxWymLV+8y9/nYHxxd9ijqIK67r9OUDDkW1bw9CyIe7Y6rQeDzJ9J4aRKzlotIxS+lmv3PHSqbl8r7OTA1oUnxpz7S10zZYINt4WR48p8jq0sE1u8zRTVa40uP44X/jqiZdkthL11Ys7738c3vm4uTqqYcGqpSUhRDToS79NZCVoTxo05w+fsAAZnx27ScFgyWmsvAwo2/DHEefr2h2v7Ir5QUDD3u+ZKoq7hQNPMed4HOk/ODuiN86luTMJONHPH+spDFPljMbvSGPFf99LZtnHh7VLBYNH8X5tgCLin/OB1rt3SrwFoSH75yKptU1kf23NyE8vrgsFEmBq+0DLmXnsE2+v4= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: a296df23-440a-4797-bfe8-08d6a6658cb7 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2019 21:07:20.0332 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR15MB1888 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-11_16:,, 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 > On Mar 11, 2019, at 12:55 PM, Song Liu wrote: >=20 > bpf events should be tracked by default for perf-top. This patch makes it > on by default, and adds option to disable bpf events. >=20 > Signed-off-by: Song Liu > --- > tools/perf/builtin-top.c | 3 +++ > tools/perf/util/top.h | 1 + > 2 files changed, 4 insertions(+) >=20 > 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 ev= ents"), > 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); > } >=20 > + top.record_opts.bpf_event =3D !top.no_bpf_event; > + > status =3D __cmd_top(&top); >=20 > 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; > --=20 > 2.17.1 >=20 Hi Arnaldo,=20 Currently, we have bpf-event default OFF for perf-record, with option to=20 turn it ON; while bpf-event is default ON for perf-top, with option to=20 turn if OFF. I think this is a little confusing.=20 How about we set them both to default ON, and add option to turn it OFF? I think we still have time to make the change.=20 Thanks, Song