Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751185AbdFAPX0 (ORCPT ); Thu, 1 Jun 2017 11:23:26 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:48089 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751058AbdFAPXX (ORCPT ); Thu, 1 Jun 2017 11:23:23 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=fb.com; Subject: Re: [PATCH v2 net-next 1/3] perf, bpf: Add BPF support to all perf_event types To: Peter Zijlstra References: <20170526055549.557818-1-ast@fb.com> <20170526055549.557818-2-ast@fb.com> <20170529091253.lopsd33qticsbgii@hirez.programming.kicks-ass.net> <20170529093918.xmbijgozjrfi22ru@hirez.programming.kicks-ass.net> <20170530165102.kvcutyfp6i2in2zx@hirez.programming.kicks-ass.net> <132719d0-a18c-d4a0-8e72-56658c0c344f@fb.com> <20170530190339.svpp53bggfznc476@hirez.programming.kicks-ass.net> <20170601133216.oxroqy4z5qjwvrdm@hirez.programming.kicks-ass.net> CC: "David S . Miller" , Brendan Gregg , Daniel Borkmann , Teng Qin , , From: Alexei Starovoitov Message-ID: <31768751-b471-c80b-a22e-aa385508940d@fb.com> Date: Thu, 1 Jun 2017 08:21:22 -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: <20170601133216.oxroqy4z5qjwvrdm@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c090:180::1:b9ba] X-ClientProxiedBy: CO2PR04CA0057.namprd04.prod.outlook.com (2603:10b6:102:1::25) To CO1PR15MB0967.namprd15.prod.outlook.com (2a01:111:e400:7b64::25) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR15MB0967: X-MS-Office365-Filtering-Correlation-Id: 070bcdae-5dac-41c9-45b5-08d4a901def7 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:CO1PR15MB0967; X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB0967;3:Ty3TR4j9eG4NxpkL21oUL2zkiAa5tuIJHJacBJSV7OSdks8CC2noT/DHwC6nCmpS0IU2NQepbUJXOdU1/vCj0cMD9vYEX0QCAqaMRwlnUuDp8aBk5BaSvawjdc5v3lve09XDcxwrQsJXLWzQDrjSODkUQV2aeEQ38C40BviDbPtsAc5skw9jxkHvu30vPdJ60v20/I18l6UvvCVOLl4BJiwKA+ScUec5ha2YNsQpnJmjkW824iQ+TfL0bTUtL5wKFtvb0YIiYxJrdaOu5z+t7BHmgfeKVAdSZLWhU2U02bhlQX9LwkmgfManO6svutoO1Jo2jMwE8e4O7BUno8qxJQ==;25:r/QNjURvYMo2Tj2fP67aF5rnaP4SRgmCcuJ45ZofVriFkRYTzrpcaooTxzo2iIV6q2VDMzqp/5orGxznLdFmsT0zYeNm4BLeZulBO0Y+NSXkG7q+O5NGc6Ekqy0OLqEIL3kzW9xglLQ/c774i4hPomKFfMVvW8Z5rEZz3a0kHxMBwwkkzKy5OkF9ZR8P5MZM/3yxqowZ0yML70r3bliq515uCfhMGwCRB7YB5+9lFaObSHWRIZAP3afZRPt15dvekMN261rHomnDdo7cVE4LbISJ5ZZuj2gJqA1sGZR25uC2D8rw209Vs0TmCRt0Lhm+FDr1JbJLEsZ4Ao4U6FIHMtzORYm0WYIrxmGyfMD39TDXiknYGxMj19+SB/ao6oj6eNveJctwk3oRn25YErPH2i6y1HYv+aseEJRiA4sZFbOoMsRhPA6Car0cmCqq70AbaLPFuYo7TTTM59Va4avUgOxRN89HhdqPotrO+aBoGNw= X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB0967;31:nAxVFdBZmu/amE3d8m2XiBs/Wvsjp3jvOxNHoxvyx5XEJc/WZif/GBrMHgskHNVheT5Laq7mri42pxikmQzh+1cYQS71MdQLNSbInF+cIizr48He3JkuC5DvjKuqFawBU+GBwAUfiyP8gb/8dQq2KUMLBfFHSxMdKtlMbXInLiLsb/FDLk8j5VP9nY988Sv7dmfiS+m3A86pCjofK2CBdrEIBl9PNOuCPb89FQybGyQ=;20:5iECrXf7RsZEdcdlMy1iYpBH10gJqaSnSIRhN3ztZ/raxkZsxik1BILQbpjUbQd4OTP48S1AJ2sxiRr/nlP6ue/VNCdlSW1X2b+BtkmNW6EuHX8+WXZ5YDeLWc/9xgEcgoMDCBPsG+Cy5Z7phMN7jAG86fdsg6goWUSQLxQdGBTZswyZrMlF9ZkXSJyHtIkQcp/qnjFC6pseeNxiKBAhcLKPQvdTOGSIEoVJEBUUMR9ew/HRGOtIekJxyBvofr8QcrSLqiiFZdLzsTAc+Ehjw06li/mcawpb1filIAOuapU+tl1tiye15SqzRVva2S6sBD/JmYB9dKQPA8+2ubG5cxyKsCVze3El0FpCstQPR98g7ITHykUtkr69qgEEMkTGQE/upEYtVqAz6QslxTR8/ZC6vnhhnwAPMb7eqUSggif+NAn3L0plT6M9ZS/ypcd+jZx8EeQemViq/s2TO7l6ukH/NHqYiT5QXYZzn+VFO7X5bNZO2RFKnTYQ+vy2Ie7a 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)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(20161123555025)(20161123558100)(20161123562025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CO1PR15MB0967;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CO1PR15MB0967; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;CO1PR15MB0967;4:HRdtBOAqtbpZFg3H8oRwJ02vUDg6JVfwbiQkM+?= =?Windows-1252?Q?p2advc4ShEIIWMmqyBcIeWaIdypMH2CC5dbAX4t3g2xubDPi8uto2KuB?= =?Windows-1252?Q?S+RXE/eNOyGOJVzW3JxG6cj2jnzKdfp/FkBaWQ07C3nBpQaRFKsFMXIq?= =?Windows-1252?Q?o6/eLUp6CutWJwTDmpZEqZSpRr0pSDkVC8Z1wRVqrOaNJ4EmMh2Mdh9a?= =?Windows-1252?Q?vrhruz7Bit6ud3D0mQW/OgRRhN2facr4V2f80n4uaAizKeS7ygyGG7jk?= =?Windows-1252?Q?kMTCcpDLa/7RmDd51SVFmBJrGgkdI1Z/3r0fe1o7aH+bVgOI09tA93xZ?= =?Windows-1252?Q?Yhp8W8lp7q9+XlVp6W46BeSZS7mzyf5rrkosUdA+tGiUI+1eQ6u+TNF+?= =?Windows-1252?Q?ZUFvWUj/aZtoyIahfQoB3vIAycp7eM40ZtjMYIKdvVltkepnSmduZtED?= =?Windows-1252?Q?cI1mSf3JRbeOoBLdj10yxlXywJMvTigu4J8B5CpA6TKRfBTWVFF93HzV?= =?Windows-1252?Q?zTKn1Gz7T4jNJxboMdQ6PjhfATKE9pTCcuTJFdp2wx33S0J1yF3sCJPN?= =?Windows-1252?Q?hlYYYN4SiGFczsKjJyTPtKnAEIgw7r/C8z+n9iwxGw+0JQV+jsRZxY39?= =?Windows-1252?Q?dn38k1LaIBes142w3YBuBndpHqsiZ+/7mJTQtYgnzifhumK0Je+T57Ge?= =?Windows-1252?Q?WY8WiKbXJwl5YZwk8nRAszKlm05tyItWonFkABAhKj4dixWip120Jf4c?= =?Windows-1252?Q?2t80nWRg4ljyyjNoM/197PKTUUHFlvdJsbhhCGGImvnxOIXKoYzQY8BX?= =?Windows-1252?Q?X/Ir0kKD9+QQ34rpTtvSLJtzCbtG0cN0V0C5dG7yfJpToc0zaKPjc3oV?= =?Windows-1252?Q?xl0DmjsZC2Qxylx6oM6S2GkbTKbTSwUUOfRRjGq0lXYliXKTDzBoaf1h?= =?Windows-1252?Q?A1hBEheLwh0jZm78jrs4KysT9b4Hz+ibwFL+VBRXf8zQQvfuH6qMeeEn?= =?Windows-1252?Q?6d48AZm6N+5kCL+HyMAnKv3vjfKEATt7WGNMl/vTvckyLzEK5ctdEDwF?= =?Windows-1252?Q?U/TtuylCynouuFbxCSlfSgc29Lt+hLk5o5vr2ioXIdB1jnoxsiMu2q+3?= =?Windows-1252?Q?ae/nOGRNNfm6ddV5NNTNefziD9163IDGfqiIzGSFh5rALVGFdyp8HWKq?= =?Windows-1252?Q?Ys4WjqcWwJK/j7ZbXycnziS5dYIrNyDsYQVp42Zf8BHBnnz+FT?= X-Forefront-PRVS: 0325F6C77B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(39840400002)(39400400002)(39450400003)(39850400002)(24454002)(377454003)(54356999)(36756003)(6116002)(230700001)(42186005)(31686004)(81166006)(4001350100001)(65956001)(93886004)(6916009)(86362001)(53546009)(2950100002)(6666003)(558084003)(189998001)(5660300001)(47776003)(4326008)(229853002)(8676002)(31696002)(65826007)(33646002)(25786009)(65806001)(2906002)(7736002)(305945005)(38730400002)(110136004)(50466002)(6246003)(83506001)(53936002)(54906002)(478600001)(76176999)(6486002)(23746002)(50986999)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:CO1PR15MB0967;H:[IPv6:2620:10d:c081:1132::118f];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;CO1PR15MB0967;23:T2UcQpQP5NhRdLz3QE9XkfBt7y+AH2DsrFu7y?= =?Windows-1252?Q?vwIw/3rtcc+cj0A0TEl8+joMHvBFGa4aj0qI+2ug6Kn4dR9ao1tTjlB1?= =?Windows-1252?Q?5LZj5JaXzcXF7h7RoZm+NOXkdsNv5LQCjopCTsam9BuPqcS+BeKwL3n+?= =?Windows-1252?Q?Qb63A7EHDcTNNyQNScCl6Drq10AamKdsEmV8gH65aAFGYyEncyRYjhuJ?= =?Windows-1252?Q?KSP/f0e3F5uAn0FjmPRCOlE5rnPmtSps6drautXrSAwpXtaOp3EDTdnc?= =?Windows-1252?Q?iy2TNIP2wcqAtubwIXFc4Owr+cWkUVP3WpFtqRgA0RcbNi8eh3aFf8Up?= =?Windows-1252?Q?tiyJKtC7l5vL2lP3O5JO/nPlslXGT4GWYJU6XuKVGtp04LXyEJJI8N7X?= =?Windows-1252?Q?vMc8yepFBCFwAY02N2vWdmXbvTgkBZVDVaavi61y0w2oB37ovJ6QJuZH?= =?Windows-1252?Q?oW/9g2i84BpgI4jwKzmqo9vtHVjIFhFqOEmXgXJBl57tXk0MK1TMZTcY?= =?Windows-1252?Q?9oaadLwjbrWhJ3WQiJVnrRnRIDJ6SI1MlrRHPkePk0yctltTxyDdBHBl?= =?Windows-1252?Q?ywucKmNsazDF/dMxoje/8XZb9lRjRxPt9b/0/UE1H/mXqfGVaHJs2jHY?= =?Windows-1252?Q?sGsVxtCOWwtESJ0EyhemHozNEtCuFV1gH7LPskKzB5RFwmZHgw8+SLfg?= =?Windows-1252?Q?wRAuShlWF50qxoShaLKi10R7bkUyfy3vYUBGbxZG1CN2PAANrHH6L0ob?= =?Windows-1252?Q?OEFPgGmQekH747E7Ek4Lt6rJQ6ePW6Cpg5doku4EuiSjR7xn0kriA5WQ?= =?Windows-1252?Q?5W9KWTzROFysxPyHUkk11fNaf1yjuYLtVuvePJPOyuv6b/DM9GwQDvjp?= =?Windows-1252?Q?01NjTGZXr8Ys1TDsVEdV2/658Sfu+R3UmtOwBAH7o8EoKKBR4oGwAtUl?= =?Windows-1252?Q?jN5NVeIYApcqqo4mOwF49B9JV6PNxo23FKo+NJGSxBBimFSbewkkNrkK?= =?Windows-1252?Q?c4L8JCaAkHIe2ttlLbEinaJTIBPGoLXlPzmiPfXiHplfAe7k+EYM902D?= =?Windows-1252?Q?YD1UmZycPfGSWNFHUS6JpmyDcid1/Nw8ZRK3ky54Sa6BKwatbf+hn0Xx?= =?Windows-1252?Q?sRk8381gmZzktJh2yZyEvaOL225gIyT4gZZf66B1A4lO8EuaTJZ1tqsF?= =?Windows-1252?Q?kAfxmNkQYY9eWhHXWq5c9ygVvdfEjnVkHls/RW3bQcx4iMEEaWX034HU?= =?Windows-1252?Q?4taKg0HNJbHBUIP6rhyDsrFKENL8zAz83nPimOb2Po45cjRsZDwvx5Xp?= =?Windows-1252?Q?uVFRO5UjzkcMunkkAoAaNeaTzBP3dhtm3TCegdfW2yFBPmtmNNFAAk0N?= =?Windows-1252?Q?aN40Qgr/slP?= X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB0967;6:7bf3H1Cg0hiny+h5NA0sICeMpqh8gOfYRm/StnOrdsiaGML7Otaoe9C/s3mDIhP7n0QIMVxwiXlkTLQPNedbHtFweFF8cq+w3DbHCto5yS203sgYQ3k1geDj/CtIPOX/1LM3l79YhCsrEgERWM5oDiC0LXxgDSgtFePOY3Sazi5rekXagddNAweRG6pOwxZ4IdK4tyxNtdyR80eLWTpVPIPuvCmOOVyrgLwBhwF/RoE3+IRzN9Q3c8wJ1X5dlsbwNB8eAr0K923AtYXvyoXP4nnGAub+Aea8hF2bx5hNY2XLYcpm9pC9gOFfVR8lh4ANBu6FOyu0MTMECYxEQE11Gb8tnUQxXfLyWvvwUxcftCENqe4AnBa4iNQ92vi5iXagalnA5eoUaewznn7IrwzPeK/z34YUAVmN1TzSk9JJHaDwT6uSTghI8kOjezTrCRPUgyqhqM28q3DW3uGhmOgc3N7aTK1cys43QPAtZKbOIx/EonCD5EOk0C+6RjrZH2K6DfyT1CwcOdVkKUYEky2R7A== X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB0967;5:XiqTeaNNk3/vBTzZ1j5zlWiclvgTuj0up8Z9mIrVT22FVTRoV4hCICBRq1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mYFIzmhifTBD6wyc7S+7Jmn57ro4sRcILSlYPhlqXcM0UOR51xbuUZQGlk/jzWrewRm2cgQn+/4= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2017 15:21:26.2203 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR15MB0967 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-01_03:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 303 Lines: 8 On 6/1/17 6:32 AM, Peter Zijlstra wrote: > OK, do that. Something like the below should do I suppose. > > It will return -EOPNOTSUPP for permanent failure (it cannot ever work) > and -EINVAL for temporary failure (could work if you call it on another > task/cpu). Thanks! Will test it and report back.