Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1841343pxb; Fri, 10 Sep 2021 15:42:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5WpYrgStNivfm92+/wR74/d8tuMiPHd7fg1u1BUEEIfGSxdSvApWaqiQ5bzNi8+V9FsNI X-Received: by 2002:aa7:ccd1:: with SMTP id y17mr27752edt.314.1631313772591; Fri, 10 Sep 2021 15:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631313772; cv=none; d=google.com; s=arc-20160816; b=sCZPHpggYzua2JYiondabaY5Mz0CBtjFl6jB/UNddNdhvWDsFhseGjBZYEcSBfpPmy YLroXU66EOz4dSfM31x6sUrRqstm+idiy9cZSH/153hmpq3tlIbaISUzc33taAt0J1ug pyqdyWFQ6UxXHf5LTRfkVSq3PSfTlNN42eHXeKfs6Q5zoT+vxUahggrYfKiRC2QORO4n xvfTDNt0rlyi5cXtaeAvcwYYc37+aqIY8AMvHehPfSW9wtSJxh9BtA1fl8jwr0nvyYy0 Mg5XrULRHvlcY2wvhpKy71W9e9VuAq/TerVwlvEMbP9JRHgd0QMkqKgNOTX6QN/8rCNL pn6w== 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=Tybn1JJZvA+Ce9/R67eZt0UWxuTntQ8ckWZHQerPDP4=; b=gsUCNqS4Dh4+hXzPYzGtbzZp9PFiRMzPFrnzw8aYO46Mz95Ag7Z3UIvXVfXgOTgcEc WUnvwnAHM/DQmXwrXbb5RZ3WC4XXOX5OZhA65YosgSd8FAirINFXImYIs/MNPPFjuhm0 Yh5dshmLB0CXpdbgfOPZJpitZ75pmPT71AsBlYEyfowlDvxJwfcFndkzzHSf2Fudp6Tx Y/GyX6X7idDHenrOXj5nZ3LWIgZOM8PoJDGO3MxdHhvdyJ9BJGUGJh6ufAMyk2CJ8nno 3V82CVTSpHXSQFInd3nBhrQK1laQfsAydauB3Ypp1T4ocvO56yHS+osiCIyHZQJG9AyS aOfA== 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 w4si5910420edt.446.2021.09.10.15.42.28; Fri, 10 Sep 2021 15:42:52 -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 S231340AbhIJWmM (ORCPT + 99 others); Fri, 10 Sep 2021 18:42:12 -0400 Received: from mail-lf1-f50.google.com ([209.85.167.50]:44602 "EHLO mail-lf1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230018AbhIJWmM (ORCPT ); Fri, 10 Sep 2021 18:42:12 -0400 Received: by mail-lf1-f50.google.com with SMTP id s10so7028498lfr.11 for ; Fri, 10 Sep 2021 15:41:00 -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=Tybn1JJZvA+Ce9/R67eZt0UWxuTntQ8ckWZHQerPDP4=; b=hqu5anktT3jag6yvQFgES+zhc0M5gUTv45AaZKoO7t/sPl3tO8ZiadhuLN3vs/4NYh io0kwx+n2KP9Rmk1dgE+Kd9deDJymBdxiNc1kD7hM7ixG4Pl/TtM3I4CmCX538O4D3iT iyEpyQ3/jCaf6pvdokxeHQCW42NCGSYrqsywrkiNwGLxzPukeDaboifoNb5Iu8Xsbe3d dlBfTxUHztKUFrsknHD81O89+yyaWpvUe8EiodR0NxapOBR+XptFUuDeb+K4n89odUSy +X86PSrj3gh9Yf05+BRRfmHmnHZN+H1h34X7lNmfHNcNtXJXgqpyxbjRm0YEwBJTRI5V d2Ig== X-Gm-Message-State: AOAM531UixfdF/ytSaZ9MYJ4akMQQPWDKZKJvS9Aev/RNWbvMMZVQUAT D2+PDhi9guNTormAyytNKVhMwoeJ77RbEGu2Hh5ad0iu X-Received: by 2002:a05:6512:1528:: with SMTP id bq40mr5562866lfb.71.1631313659550; Fri, 10 Sep 2021 15:40:59 -0700 (PDT) MIME-Version: 1.0 References: <20210908172420.879240-1-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Fri, 10 Sep 2021 15:40:48 -0700 Message-ID: Subject: Re: [PATCH v2] perf/core: Add a new read format to get a number of lost samples To: Jiri Olsa Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , LKML , Stephane Eranian , Andi Kleen , Ian Rogers , Michael Petlan Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, Namhyung