Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4136452pxt; Tue, 10 Aug 2021 21:35:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygpmcjqH39ZMvXMHZcSuI7W5zZp5RjihaagjNthADJtYvNYB1D86p33iyL88/Rjsz9g9Z2 X-Received: by 2002:aa7:c799:: with SMTP id n25mr8775068eds.16.1628656552131; Tue, 10 Aug 2021 21:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628656552; cv=none; d=google.com; s=arc-20160816; b=GuLJXTuqPeo5fIJ4SictwZMfoaNOGDqiB1zNAY0U57CuQBmcNzjMtvEihN5OIsLL/9 e2PlOpH0MdWsaPjHLIeuQPb8apzL09tkraX2PTfA+mkifciDcqrWPadRgnwWiDVXQT03 emJVymwPGYFQgKN0ki8eA3wA7hkBMH3Tm7OI/KJ4Rb1L1MtEE6/pT3ev2FKDHdWshRDB hCMR7D59fZBOPSqLjxUOZ5zZW/t54hEkB2gC6EVdYxfdIhx2fAc9s+3+vvl2D+JF/6vn mq8iILQ4R0hGnzEjEpLby46dbwVaYMQfA8zC6z+XDBK+nSO90jLtDHfV44M/RvVJToZT x3Pw== 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=+JyTIpyUoOH+FpHRKLiZgIeYXX8zEGMVThj9kDtlYpc=; b=mACrXlHyr9o0hbxTSQU0hPP59Qd9j5XfmxTKHsdpNaC8seGYx8FsnxvSJB6bC8faIO BN+OSTc9nWdY4md2PvJnRkNQ0U+L8tm9+aEnMJ0M66QU85YycH6yKGrY04r0GHqBFn6y xIoCrhwJ1cvBRtNbbhRb2cU9IDhWeFGRDZi20eeyIrUvDkBDThTgkLcCctE/3SggEOeO 6+tD0jdoM7A6FvAC90G9ky0xznbp94KpmFZnxK/snjuC7laUiOHaQ+KjMeNMENj+0U8V pBNRzLq/mSAkAgPHjY3lSu5epECfhVebPL908d2AONYZA9K/PN2f9Jk59mmP0zrgT7oB SSUg== 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 10si11665698ejt.595.2021.08.10.21.35.28; Tue, 10 Aug 2021 21:35: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 S233436AbhHKEee (ORCPT + 99 others); Wed, 11 Aug 2021 00:34:34 -0400 Received: from mail-lj1-f171.google.com ([209.85.208.171]:46602 "EHLO mail-lj1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbhHKEee (ORCPT ); Wed, 11 Aug 2021 00:34:34 -0400 Received: by mail-lj1-f171.google.com with SMTP id h17so2345029ljh.13 for ; Tue, 10 Aug 2021 21:34:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+JyTIpyUoOH+FpHRKLiZgIeYXX8zEGMVThj9kDtlYpc=; b=PzZK2iX4HdZypOyoDUPK1IfE+cJLPaSvU5604zFupruwEQfyjylnLXuxwbA3XUB/Fx WMi6ftOQvqbZB/txFnsOUyfQtOLj0rBW3d2pgIDMcoPYbi4n6hEGpI/o8Tk37e1KJhes 0c1+IrFbTtb8eSKdotbVmphgWgrrifZfUSbmWinnCJ8SNO6VHri4KcNtjnCJZQ8ehLca 4BaILAkjzmSiePS/lXgnTt9GONgLwuQOOlXWX/L9gpp7iNpzj5fxw4FUmgMTW9bmpDF9 rWp+vcXOUSBmjIOAmGA4fZf0UuKOBpKfI6IFQZE/IOSD6SCIkF0f7Ojd+q+X6X1TmFjq KT8Q== X-Gm-Message-State: AOAM531/pQJR3qiWj/CaEWu5QPSZ6FY2K31FCphsDsyAmYqn3phqQsvh naI66QBeofvrboTXdW635LslCcGhqYYxcSCb07Y= X-Received: by 2002:a05:651c:38f:: with SMTP id e15mr21496438ljp.233.1628656450266; Tue, 10 Aug 2021 21:34:10 -0700 (PDT) MIME-Version: 1.0 References: <20210724040129.2268452-1-namhyung@kernel.org> <20210724040129.2268452-2-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Tue, 10 Aug 2021 21:33:59 -0700 Message-ID: Subject: Re: [PATCH v2 2/2] perf record: Add --synth option To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , LKML , Andi Kleen , Ian Rogers , Stephane Eranian , Adrian Hunter , Jin Yao Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, On Mon, Jul 26, 2021 at 6:15 AM Jiri Olsa wrote: > > On Fri, Jul 23, 2021 at 09:01:29PM -0700, Namhyung Kim wrote: > > Add an option to control synthesize behavior. > > > > --synth > > Fine-tune event synthesis: default=all > > > > This can be useful when we know it doesn't need some synthesis like > > in a specific usecase and/or when using pipe: > > > > $ perf record -a --all-cgroups --synth cgroup -o- sleep 1 | \ > > > perf report -i- -s cgroup > > > > Signed-off-by: Namhyung Kim > > --- > > tools/perf/Documentation/perf-record.txt | 9 +++++ > > tools/perf/builtin-record.c | 48 +++++++++++++++++++----- > > tools/perf/util/record.h | 1 + > > tools/perf/util/synthetic-events.c | 28 ++++++++++++++ > > tools/perf/util/synthetic-events.h | 12 ++++++ > > 5 files changed, 89 insertions(+), 9 deletions(-) > > > > diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt > > index d71bac847936..03a41bec0583 100644 > > --- a/tools/perf/Documentation/perf-record.txt > > +++ b/tools/perf/Documentation/perf-record.txt > > @@ -596,6 +596,15 @@ options. > > 'perf record --dry-run -e' can act as a BPF script compiler if llvm.dump-obj > > in config file is set to true. > > > > +--synth=TYPE:: > > +Collect and synthesize given type of events (comma separated). > > +Available types are: > > + 'task' - synthesize FORK and COMM events for each task > > + 'mmap' - synthesize MMAP events for each process (implies 'task') > > + 'cgroup' - synthesize CGROUP events for each cgroup > > + 'all' - synthesize all events (default) > > + 'no' - do not synthesize any of the above events > > this only affects events we take from proc right? Right. > > should we perhaps mention it, because you'll get mmap > events from kernel even if you specify --synth=task Good point, will update. Thanks, Namhyung