Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp777017pxb; Wed, 22 Sep 2021 12:38:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXCZL1ukBsqq2Oqr0+DZztopNzKtMat2dzf0tkusFi4A2V3UHkZykEkkHjVdiSOehvtRqP X-Received: by 2002:a17:906:e097:: with SMTP id gh23mr996352ejb.137.1632339528173; Wed, 22 Sep 2021 12:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632339528; cv=none; d=google.com; s=arc-20160816; b=KiyBUjkMY/wNAfwfNibBG0mJQabH1dmSxou6hyQOQdModaXHfDG1dcLxLLeewocCPo 7tUm+WZZ2TrjGHfzs393lNLHbyZOjOuEov3P3zxsjX99kpK4k+YBV2CYysRKknSRFFYG XMhuK1A+eTTw6y5SVamUroGb7NDK7Y6346vsUFcJ4nhWMe868v4oweel+SLO27W9bvTj VPhJGqsWUP7meV1pLdRiRRLtmqo0Kcl8wAewiJwhGu7D50YaY02TxHdBENQY+FaYu+Hq y+d6DxCw+t6uQEcA4pPqtHX6zZC6DI+ptxhske9kVrT/dgz3aE0g2Gj7GswBWtBtXxy+ 9flA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=2Vnkrcw4DR2JdIAuglIphbFW5KXKuuI/s8yEeAhjVjE=; b=GPl2sZVw7tuIj3pPllhQZ/Xn3xTZKd8q9oetdrF4NRZr9PbHWaQ9BNWhjZZL5hRLkK umDM1G7TAhTv7IQDaspwtAUB6Ukes+/RdgAzw9MhRswPOGr5AxlGAyebbDaV2O6sSr2H gnHqTg8QbJploQTY7VwRuOLTDi6uxf03+uN4cCGWBi+wOKA3UFgaOM7fiNZinigGAq3D KsGE5WO18jTQcrCvEhOZ8VOT4O7dY0SMP2T8T2L2Vu1KFSBXwzpu1+Eo++mw43RST1sn W27Dw+yJAD9bwbTxhzJ/Trlg8aivmE3+yqKWeaCBjf5FO6RZ7Qqwax5lHAkkBmbhWB7M EXNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c15si3922450ejz.158.2021.09.22.12.38.24; Wed, 22 Sep 2021 12:38:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237212AbhIVTgD (ORCPT + 99 others); Wed, 22 Sep 2021 15:36:03 -0400 Received: from mail-lf1-f53.google.com ([209.85.167.53]:37726 "EHLO mail-lf1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237186AbhIVTgC (ORCPT ); Wed, 22 Sep 2021 15:36:02 -0400 Received: by mail-lf1-f53.google.com with SMTP id i4so16269636lfv.4 for ; Wed, 22 Sep 2021 12:34:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2Vnkrcw4DR2JdIAuglIphbFW5KXKuuI/s8yEeAhjVjE=; b=BatiLWrhX5hWvh9w0Kx+RnN0M74cPJ+DkoqVAQrttYYBkuA3Hx68momTXIpXphRYCh qKWDcI3JQTUsSl6h0O827zEtkGnCLWnjtgFkexVspApAUm+XVyPjDtS69iKjk2oWPpM/ gC6VQI/aMALo5mR/BVS6asK7ML3sSpzrWAH/FHbz01/2djVjJIbGjSfUbItvNp+YokIY 5Xu3BjAtUl05NhNJEtetWljNSsQHPcDKZ4h8j6enrJk5eN4p9LN5GLErr9hi+7OTcToz 1BGiBQCUmQk+5oRvVnAYoieCK9/REmcXpV+zy5JuUGbLr8YV59Ur3TNNmsSfR3Hp07wL f0pg== X-Gm-Message-State: AOAM532PmC4tXyMDJ5hkrndRDaM0JMpuLF5s82xnDBWlr+IrlByFsiQG QR5ZEtm9AHtSZpETYkY5IVP719mt7NJLGIjZ+BgKWY7f X-Received: by 2002:a05:6512:128f:: with SMTP id u15mr650392lfs.528.1632339271292; Wed, 22 Sep 2021 12:34:31 -0700 (PDT) MIME-Version: 1.0 References: <20210908172420.879240-1-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Wed, 22 Sep 2021 12:34:20 -0700 Message-ID: Subject: Re: [PATCH v2] perf/core: Add a new read format to get a number of lost samples To: Peter Zijlstra Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , LKML , Stephane Eranian , Andi Kleen , Ian Rogers , Michael Petlan , Jiri Olsa Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On Fri, Sep 10, 2021 at 3:40 PM Namhyung Kim wrote: > > On Fri, Sep 10, 2021 at 2:42 PM Jiri Olsa wrote: > > > > On Wed, Sep 08, 2021 at 10:24:20AM -0700, Namhyung Kim wrote: > > > Sometimes we want to know an accurate number of samples even if it's > > > lost. Currenlty PERF_RECORD_LOST is generated for a ring-buffer which > > > might be shared with other events. So it's hard to know per-event > > > lost count. > > > > > > Add event->lost_samples field and PERF_FORMAT_LOST to retrieve it from > > > userspace. > > > > hi, > > looks good.. will there be some tools/perf change using this? > > Sure, I'll work on the userspace part after this is merged. > I'm thinking about adding LOST_SAMPLES records at the end > of the data section as if they came from the kernel. Can I get your feedback? Thanks, Namhyung