Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1293853ybl; Wed, 21 Aug 2019 13:06:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXKlvYSudknjIOqWfmCdsrZbKzniYAwn4nYbuf64zIbk7RHGOX12h56d+ZcoS6+vnBQtSd X-Received: by 2002:a63:24a:: with SMTP id 71mr30126976pgc.273.1566417996833; Wed, 21 Aug 2019 13:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566417996; cv=none; d=google.com; s=arc-20160816; b=hom0DUD6ckVe+1qdUEdgW+HrQg9zNB1APW0itPUDOvDaGBfCVfJxTjw7thHRcmIZvy YUAbWZLnrN5cGDncuy9o5znk4EbNvoH2a5vHN6m7vM+eSBE8kZB3GODFGt51Ep6+4iYW ezB407T1cMFH5lRbavPRIQJSzfUW52zPGkyWBHrpHt525L5R+AyjfzCoJUJ5yia8hO/X WNo4NfUnkuD8XtnOc0+Yri/Fexi1E+mMofW0EQRtYYJMXDR23dZsHrfu3k3u4PToinW/ htL4uypGhgsigAU2II/6XF0E8kSSJcU6U9W6WitqoGGBtvvWa0CeSR5A3yknTxN4M4/F Xedg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=PnHB8gyKyQN8X+3fWDRw3LLnwjDF9vWYPYJU7kI+Ljs=; b=wg45DCPP0MPr2hZrVVtPDvvkHSfwut4OiAZEQf7iMsGHe/NJ/SYh8lzKZZ5oVdBTx7 kkH83BEz0IF7VSTi/QGkQihbbXxISVnYMHENIoAeuG3yrk4dlbGaPAZon5CYSqwh9qf7 vPnhnigLx8dHaZKmjuTff2U/DnHhAYl00ZalPL175WUQitfjdHj9duOdngj0LuBmv+0H NhazVKg6trt4cyoY5YYDC89mJXrTIKFguKdHpG+F8/+PnnveDpY9bYIX1kqjy3auY/ZA KS5p3UYv9PwixTUxkLEIrcLYuzA8NIPpqUXGmT3JxayEe8kkevHNYwnUfD5i4iFxS+kV aQNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Qb4/QdgA"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si15490702pll.333.2019.08.21.13.06.17; Wed, 21 Aug 2019 13:06:36 -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=@gmail.com header.s=20161025 header.b="Qb4/QdgA"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730282AbfHUUEz (ORCPT + 99 others); Wed, 21 Aug 2019 16:04:55 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:36757 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730101AbfHUUEy (ORCPT ); Wed, 21 Aug 2019 16:04:54 -0400 Received: by mail-qk1-f194.google.com with SMTP id d23so3015923qko.3; Wed, 21 Aug 2019 13:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PnHB8gyKyQN8X+3fWDRw3LLnwjDF9vWYPYJU7kI+Ljs=; b=Qb4/QdgAopIiPsSKrI0Ml0FWuBhpglzWZIh34AIf9iP1mPAKLFYigjyoH+2SHsz34F 81taKwT3AOCD3UzL6iPnjsIIABaX//3Lb+s8TX4PxB8BzCZ4o4NkEPmgau+U5WV+UO+D nMfmqHhkFKaY0sYs9lt3ejUsgNLbBu0rXaLEhlUWGP4HwThKtMrCeeFG3JXgIvGyZEEd VXdW/LXakjSdP3TWg+coGg4lY6bBqwtGgDeJI/YihggwX/NMvQFokdp9kiJ0SJFKMOWe 7dOBsGnUKzNodvA9Mwc3NgTOecfTaAo17cBPqd87Vult6Ci2ciYoY+L1alA6zEIUyW+s CQYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PnHB8gyKyQN8X+3fWDRw3LLnwjDF9vWYPYJU7kI+Ljs=; b=TYkRRaJNUqU81uGIzh5/vm69uHk31MY/GSqHDEZJ+MLIafaTRx4zk4koBL4BgeO6fZ g7+zpH0OvmF1iu0m6jZV1RtISxtWJcZxdz0tzQOFN2bcdiVMf1/HG0YAksYJkkoL9gzB Wz+oPiBwl4kQSx24xQByBNiYWwqHzzHaY1jjOBmgcK22GN/HbGAwFLCizKPV+jefbJ7q Vg4sRHfbD29Nj2eyKd0Sgib7TtPzj22hu2ap7tGzhnqz7ishaIwG23PKNDEV2ARUtg1p qZbTTNYKiqAVSOf+hrsacyosSjAnSbSYj4l5CB4QALRn89xiUy5+ImsjAnb6UIq/vfZP IXCw== X-Gm-Message-State: APjAAAX+0IEFO8Wd5TXPTS5/+yeJEqk/u5HGfbWLifzn68Y52pHpQI7Y RAPgJ0BgSFX6JkGVQbhIdcw= X-Received: by 2002:a37:2c41:: with SMTP id s62mr34120263qkh.415.1566417893345; Wed, 21 Aug 2019 13:04:53 -0700 (PDT) Received: from quaco.ghostprotocols.net ([177.195.211.175]) by smtp.gmail.com with ESMTPSA id m194sm10497757qke.123.2019.08.21.13.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2019 13:04:52 -0700 (PDT) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 9B23B40340; Wed, 21 Aug 2019 17:04:43 -0300 (-03) Date: Wed, 21 Aug 2019 17:04:43 -0300 To: Yonghong Song Cc: Peter Zijlstra , Daniel Xu , "bpf@vger.kernel.org" , Song Liu , Andrii Nakryiko , "mingo@redhat.com" , Alexei Starovoitov , "alexander.shishkin@linux.intel.com" , "jolsa@redhat.com" , "namhyung@kernel.org" , "linux-kernel@vger.kernel.org" , Kernel Team , Arnaldo Carvalho de Melo Subject: Re: [PATCH v3 bpf-next 1/4] tracing/probe: Add PERF_EVENT_IOC_QUERY_PROBE ioctl Message-ID: <20190821200443.GH3929@kernel.org> References: <20190820144503.GV2332@hirez.programming.kicks-ass.net> <20190821110856.GB2349@hirez.programming.kicks-ass.net> <62874df3-cae0-36a1-357f-b59484459e52@fb.com> <20190821183155.GE2349@hirez.programming.kicks-ass.net> <5ecdcd72-255d-26d1-baf3-dc64498753c2@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5ecdcd72-255d-26d1-baf3-dc64498753c2@fb.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Aug 21, 2019 at 06:43:49PM +0000, Yonghong Song escreveu: > On 8/21/19 11:31 AM, Peter Zijlstra wrote: > > On Wed, Aug 21, 2019 at 04:54:47PM +0000, Yonghong Song wrote: > >> A lot of bpf-based tracing programs uses maps to communicate and > >> do not allocate ring buffer at all. > > > > So extending PERF_RECORD_LOST doesn't work. But PERF_FORMAT_LOST might > > still work fine; but you get to implement it for all software events. > > Could you give more specifics about PERF_FORMAT_LOST? Googling > "PERF_FORMAT_LOST" only yields two emails which we are discussing here :-( Perhaps he's talking about using read(perf_event_fd, ...) after having set it up with perf_event_attr.read_format with the-to-be-implemented PERF_FORMAT_LOST bit? Look at perf_read() and perf_read_one() in kernel/events/core.c. - Arnaldo