Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751251AbdFBOfE (ORCPT ); Fri, 2 Jun 2017 10:35:04 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:47009 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750955AbdFBOer (ORCPT ); Fri, 2 Jun 2017 10:34:47 -0400 Subject: Re: [PATCH v3 net-next 1/3] perf, bpf: Add BPF support to all perf_event types To: Peter Zijlstra References: <20170602020336.1062853-1-ast@fb.com> <20170602020336.1062853-2-ast@fb.com> <20170602080605.h42o7i27vmjrhz25@hirez.programming.kicks-ass.net> CC: "David S . Miller" , Brendan Gregg , Daniel Borkmann , Teng Qin , , , From: Alexei Starovoitov Message-ID: <92f5537b-6450-15e7-a70b-b6d5d8161cca@fb.com> Date: Fri, 2 Jun 2017 07:33:58 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170602080605.h42o7i27vmjrhz25@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c090:200::1714] X-ClientProxiedBy: MWHPR11CA0016.namprd11.prod.outlook.com (2603:10b6:301:1::26) To BL2PR15MB0962.namprd15.prod.outlook.com (2603:10b6:201:15::24) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL2PR15MB0962: X-MS-Office365-Filtering-Correlation-Id: 5f9ba011-02b0-4213-1fc0-08d4a9c4698e X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BL2PR15MB0962; X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB0962;3:Fjfr/dK3IK+8vVxtnvEdMynkhu5yZ9P3lTx8O36b6IUnSvcbvxgeMMdDqmuWWeQi3PLdE2QNtH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VSzQuZf7TbS/4mYIIyxMLwPby+BJZmNWTf10STuBJvIhjSsbjH3MXLTeGwP0qAM8ealB/FMVVBZS+P2W3+iKt3/JZHiy4Ip3RNxaQYZ/DU2NZJJzMfaCxg0NXTeQX77xszxubOhaVkmBSh5gjmCcce9WKu1Y/HtIkalng7krb2xunIx+7mVBL+IB4VmF9f316vlfGVeqNoGzL0WzpdvIlx4yyA76h3wwmd2azYx5ZSoEXlkdn+dDfiaFiSIA6UFtuov9rXY5JwEHeIreILsHb40OZdjtb31GujNkVLVMKd6Q2Lm4zFx9IWgai9Zaq617ajeLTG81bLoZgU0rNe/5A15RDQk+07Wvd/qvLLTzM0QpsIxvUD8T2/thNHoVlANZuxUtU4DQGd4dvnOktcIUtQcE0Kjxz/yArM5tKIKoPPZvMfd4akwEQ9E4MM1RP+3ENn/NoJBRGKkm1+mgPafSLss7WZK X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BL2PR15MB0962;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BL2PR15MB0962; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BL2PR15MB0962;4:y4QhCCKMpDDoj7bffSxmr0EfytVw0ZLmjEiyqo?= =?Windows-1252?Q?yaLyEtPNF4Oy7O72NwMNBzWaXNhnmoXy0DxYkZv7xEW1yJYTPs9j1W5H?= =?Windows-1252?Q?rdrPH8MU6hQ2gfCMnE5fa1ovlmGWlaS/NPS0ovKKbtqbHv+L8dz+yf6p?= =?Windows-1252?Q?P8pHMP/BGb+IK67VkwhMdvMEAww6wluoKl5GgnTeAnwx33OCQpFaf8Fs?= =?Windows-1252?Q?5pDgnjoySBEErJLKIKcpYAdYmKgm74Dcq9E8OVqLZ2YrsG58jKft8kGM?= =?Windows-1252?Q?u+/nq8FjAJUj+ub0bHKzqTgmYwduhxigdhojIml3Zi1ECPJ7vNYVhbbm?= =?Windows-1252?Q?8Uzxul1S3823yDBa6GQYf2qFuo0fmyU+pu+vYAadz9mkVyyvfw0AnU17?= =?Windows-1252?Q?ugaChz4eJJBi35t9HgG3cmP7jgK55S5O2ULuhhdj48ad+MDLAayXcMoI?= =?Windows-1252?Q?MrxQRkQUggWHmPBtC2hkXg1c6Jp4GDAdIMseHt3kFiGTPpkfyBgrJLzR?= =?Windows-1252?Q?Esnwj95d6MtMS/eaOkzCMy5XYiEQQQVoZxnhFGuKB+R+huCqxjnyOE8H?= =?Windows-1252?Q?XmG4d5oOkTgYmruNJ4wzzOS5J8mYJTpuQF+XCRbb5imS6c/DPWj8zHC+?= =?Windows-1252?Q?Kb9/ePTwQ+P2UO89i4eLfJNSn4Aj8R642Xu83umSPj7Ur0/UULTyG9Zj?= =?Windows-1252?Q?bLvEN34AryrDMg3CKsBsiSJEw56R/uhYfAg5zP4XUysyPWs0a/qcDCk0?= =?Windows-1252?Q?ppu8SQglo3ullEqD817/T2oAzO6vWYG3rh86u7GhqftT76Hp+sisKniA?= =?Windows-1252?Q?QdWlFsHiMT0Kxd+070zvXxU/hJBz8ilrxFOGdrS9//R9zXo6T5lVefxK?= =?Windows-1252?Q?/UKckSZk0+9OBtLj6RlMNjIWB/cItJhOIfn/XuSiwYkhQ2V0dZl9bYZa?= =?Windows-1252?Q?LsnrU+NLG0ddFByIAXh67VzcJLCTMWN1qP5ZXgyMihs3KqSsqisSo6yu?= =?Windows-1252?Q?A4g7G1C3tIvQxhhQdzuoFIXuEOQ/4yviYpGByV+GGFa2d1UKXl23Izkp?= =?Windows-1252?Q?xwgtXuiOcT0i8HKqbsUTg6yf4gzaksj/hRQU1C1+Bv94Rl8QXPhM265X?= =?Windows-1252?Q?WddKk/O0iLyRsdtbw50nEge29h8XWsMxhDMKNOxQPX3Ms2zFaduUAnhV?= =?Windows-1252?Q?aleS3TObvqX0MvTOAKb9AADDuj5FHwHhNaq1fJDvkBRcx47bv4?= X-Forefront-PRVS: 03264AEA72 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(39450400003)(39400400002)(39840400002)(39850400002)(39410400002)(24454002)(377454003)(6486002)(38730400002)(110136004)(54906002)(83506001)(36756003)(6246003)(53936002)(305945005)(6116002)(4326008)(7736002)(8676002)(5660300001)(81166006)(65826007)(478600001)(53546009)(25786009)(2906002)(23746002)(50986999)(42186005)(76176999)(50466002)(54356999)(31686004)(31696002)(6916009)(2950100002)(229853002)(33646002)(558084003)(47776003)(4001350100001)(189998001)(230700001)(86362001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR15MB0962;H:[IPv6:2620:10d:c082:1055:41a0:992a:1ecf:821a];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BL2PR15MB0962;23:9lwh2Yhtnsm7KhNFSQNLuSlB/3ML3EbNCqb0Q?= =?Windows-1252?Q?H1shPwrdbee2oVt3LlZwTBNaACo7rePyRqOTkcY2VO1IDV1dxEmiz0rX?= =?Windows-1252?Q?Fv6+YEb2eDc3lQMiZKJvJsmlNmf5gTtK/w3bziqh5NuRP5koGk6bBpP0?= =?Windows-1252?Q?Uk1DNmY4QT0hZpErSRYGfkuF8Wd04adXQgPIzTcSEgRhUY0glgCd3bOP?= =?Windows-1252?Q?T7uY9NJ+pKZBZ2/vgdI6n/0CXphyyKkIGoEYrhPraepsmL8mdAy/Rrm0?= =?Windows-1252?Q?TefjoOH053uUuv8eXxov36vKxEMJWYRk9vgQ1BAYfZvQydJplpMBilvf?= =?Windows-1252?Q?N93XRvJ/5v31y+Ua8jTGQrSowoBBEtQ64kS9yAQNzvWBFdjSSiozT6am?= =?Windows-1252?Q?hafvtxFONJrVtymvwtzygkVXfO7f3q6S+NBkP2Nq1zeGsJU0kjTqJ5fh?= =?Windows-1252?Q?mFuKewFSlilHOXhqheVLNULEcptr57q0P/L6FewTYY2YIvKYBYIMub+K?= =?Windows-1252?Q?/nuPM1Lmy2Gwe6OvcEkuzT8SkVg0FEDa0bZhIcWSQ1Xb+gCMj+6F/v+T?= =?Windows-1252?Q?S4iDZCphB1U2X/z2+xo0mEQmTUqYE4wx8LuMmqWYu8VflgRZLWilJc6L?= =?Windows-1252?Q?dw4MRvKJHM1C2MUCxLjj/89sdsQVumj3+G5etPZbpnF7Ls1oXhw+zPRc?= =?Windows-1252?Q?nCbiJ8+9JA9IceGNVi2t/osSdUuApv4TqIQ36HwBsEQewJ45N65icsOS?= =?Windows-1252?Q?FYnbaV0D/lfVS9JgAy2JI15c5SfFdQZ1/tJyea1mzTQDqhw38wkgXNZB?= =?Windows-1252?Q?G0hI9sUPqow3V9NeORcq3bsK7gfTmsO1nLfEgn0xpP1YVCH5HG23b578?= =?Windows-1252?Q?H1XaAOC7aXJb9jyCUK6wPCtHFY5K6WaHmvHyJsjiOYIRUORawUYtPHrd?= =?Windows-1252?Q?iUu2kKBz9YgF4QlB8ghYnQtNZNDmGA6D09ZWSP7HwGi4h1k1s7G/VKGq?= =?Windows-1252?Q?qAgQCy+OVZP6wvdg+Bh73yuvzh84WyGGIOGQUH2ciK8T9GnUXhTqBT6e?= =?Windows-1252?Q?jHvhZT6ZeU3ugEITISAZxH4Z1TzFZdSOljFHdPWnPS3Y/StXUK2lN0Lk?= =?Windows-1252?Q?ZonJ/fEcbzVV3cAxLe84LkZRoD5jm58sXYMCXlotWciDAfzhQ3MjV6yK?= =?Windows-1252?Q?Qz/13+dfd2K/cx1bPD9BIMeMNqr3N4qg2XCPznzPVJsl5H4Lzr7/xbrR?= =?Windows-1252?Q?95yt2TsbN26xrbJQJuqgCZqWvAa731p31Jcj7C7B9RRvVDcV/DeVRM6P?= =?Windows-1252?Q?kth?= X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB0962;6:KZkLvAHggM3EypttXzuV9t2HS06WGVVCDlm+iHrjWS5VaWAr29ARA0F3x0QUEQMuWUk9kmWOYeSt+Y1WIqU2McgrPJXYt4ueZ9P/aYuR+NN6+5+e0Xl66+FFutEmPQkR4ztNM9IxfYxp8tJuzaKjPz1wtDhRh6iA60pWlgvXHv9Vpz7pcazDRHK+30Y/B2N4WT9xBCQ94LvRGxoF868BLXt964Vcw8feYppGse9BfgHjcL3cvn6X7ZlMf4RhamVybha27aWsF4B9yraGrNO6HXia9y+81YnJFqoYTtwNp+mbqCzOu9ojc3916Jbr+TORuKSLCWZ12Wf5ixhobFEkyvEPA0urLyy82iFWQpOnFnk4FukVtJqf+WAjxI1nb74FoU+qzAy6HKMR9uewGrGvRFsbDg0R3KXcDDXJON7zmUcJT15flK/nrtBKVzF0/XAOt9JeiaDHesU0fssGdtOptNDt5CtNyTbMlvhBLO/xqdQ1PpoTpTnKSeQQDuxSCQCmcQsR3Qkcv7j+dNJVdop4sA== X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB0962;5:zVk0n1a3uE4UYTEEGfTizo0dykuEmOSiKlARqetqT2Qahnrv4msvb9kinl8XHKaYRA0TFg0lk6b3KXC7m8hqZZGA3OBVR+FHBmM7KIgleevScQ1F8aqkSaHBq3qwpXA75iyyzcZXFxJtvwTNS4ueZdM2t4NTzqonPCOtanhD0pZ7YNPh4IZhii9LiQfXjzUM81WqPnva+qyDKMBKe6pfuHlX4tObecyIXyrIAjYLAf74aL0OasKX9aHgFbZjwws8jWqKIom9hikfPy6FlehsJg7rLHZArvmcsGxOXhiSGt7KTPQrOEUePhZOo3qZXbgA4fcgJH9tL2kSPfA9815vcxSO8gw7a8Gsr+hQLwyRe2GRoMzHZNK400tGCrkdP3e5exLPpQKOv2Nb45REy8irmBa1yBoTra/dZh9LTE45VS3qMgslj29JlqOmb0Qi+F0YnsDXVN2blMigmkdDO1brJm7079pqCMjQJ/vMMINVvKKZyPkRmV5+xNbOaAo578YO;24:bT1wa55LUqDYgYf56tSAHtwT9KK9uDp2uTtdj7qKOndJUAs9j8yxtw9G8fqK9efp9z8BnFqcahBwG6VGndEUbSyoMYE3UiT1NTao6VgNY0A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB0962;7:jKGKy1x0Q6d6/YcjZnhQj+MbnVnWi7ENotXSVMFggYC0u1FndjqccHMFLAzHNmOelMBo3v1M0raumFLZDBV8ZSSZtTr2D3eWjxSaMdyiIGu/NGn4w4goxThuBQsRVrHMvJxi/rBIkxABNx6+hSHuMoqht2gZbuiJ4PKkniAC+cz5qM+v6zOSbl5FDxtTDiIc24i0Fivk4SNpbzqEqpnuou+U3hgGwA/h7RXtaExmrAMkvi20marEeDkl1b/k8Br44+ic9L7CYEyfDDAEncFUfZRnYdzZ12X8dj2tZhr5kKGstqKUQTYeo9sB8M/kdNCGMapHqzvgKaT9k54J4v3gLA==;20:Xhh7pTbjy/znH3qUD/MDLWaGN4cEUlV1sCL3l4RK39X4gtWQDqzfwQo3MS6WGsGx7Q482UkWAEcua6i3XzW7sTHkWP/n1FXOJX22malwOyWO8/25vCZq9VAGdGQj6WOLg/4omsg5zY/kYtQxxcsrr3aKxMH3pmBeM2P3c1WdJ/E= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2017 14:34:00.5375 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR15MB0962 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-02_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 239 Lines: 6 On 6/2/17 1:06 AM, Peter Zijlstra wrote: > Would it make sense to call perf_event_read_local() on the events here > in order to weed out the -EOPNOTSUPP ones? excellent point! Finally understood your idea about that helper. Will respin.