Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1599256ybz; Thu, 30 Apr 2020 02:09:17 -0700 (PDT) X-Google-Smtp-Source: APiQypKAKOKO0P0E1dWpOEWPZfjAIsm9VZbPjWa5M3anr6/NRDZIxm4bkQCVXegtFKTSxU+krsoN X-Received: by 2002:a17:906:cd0d:: with SMTP id oz13mr1790761ejb.82.1588237757046; Thu, 30 Apr 2020 02:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588237757; cv=none; d=google.com; s=arc-20160816; b=legPX4oVjMIM0In0lDMcKhI/rWNbLaCaJMP4BjdPswujEvHdg2R9ok2nLIFhx5+DuE FdDq6efyeHWYt2Oca3GRK2pjntp41aLpi59JScbjhUayiNC2ZoirClNk7G6rMHEA7mzS UqaqD9fFBSXqEUD4bhYk50ETySdFVBm2n8ApkyizazdzeNL9gKBq32PpXNkze7ul1Gqr 02QDFMtCzDZ+7dUJNyXxVJM31b27lpelb4/pebnELSigZnLo+i+UsHXUJtpWM5Iv/nmi EWci/wFk+YgymQ2PAmicXVR2M0FIR1y4ewgpw08F2BjwvJjM+L6dY6dLopGmx5JXKLRr eNug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=YJSRBzXkcibxsSPh9O1403Rk/EpaZM7bpyleRS09wg4=; b=gUThLdLqlk2ZrEtbPZQKzPStIJ9SNuqOrEGEpk6xegWZRLeaW55WzDiOdB6inMecIi km0Xqj8rI7/3XfUiPWyR7kayoVQUxFcwsCFt3k1X05DHnEI8h0RnLvZEM1Kci9JPSNm2 +WFJRB8i5Gwwe19WqIOyhS1WQaw9kl9lpOBKwnDpanFfqWtUeFe82jR+1XlP5HLCtyVx lDpzn0NFZkn7H0KED6kNZQQIA4KenSHuhGvK1czSTiif/6ujEgGVzKqWI3AzhqYoqtN5 nQmYuSenOBcxnBMSRzoKWbiAxjtYCIQily2hsjNz0b3KZXsHvVZyv1pQ7AHyXhnWyl0G VNtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VkcoScqT; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t24si5293214ejb.144.2020.04.30.02.08.54; Thu, 30 Apr 2020 02:09:17 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VkcoScqT; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726755AbgD3JFW (ORCPT + 99 others); Thu, 30 Apr 2020 05:05:22 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:56865 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726127AbgD3JFW (ORCPT ); Thu, 30 Apr 2020 05:05:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588237520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YJSRBzXkcibxsSPh9O1403Rk/EpaZM7bpyleRS09wg4=; b=VkcoScqTNRdxoyqrrvV5Zdz6MA7I/B8fn83RWmQ20xDcAq1QeugpOPEkV2+4SXB5W/Ki5S js9HYgPZmIha+ml64w18wMP8jehcKKtVYHkAVIJ7Pg//e2bSaPuqWLdoPnikJ2DXGNiT9d 90EdhkFYuOuFTOTjAkKTp0n+AdeNF10= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-194-5TO6x0G5Nuiy7rlFhRFNRQ-1; Thu, 30 Apr 2020 05:05:18 -0400 X-MC-Unique: 5TO6x0G5Nuiy7rlFhRFNRQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ACAF38018A5; Thu, 30 Apr 2020 09:05:16 +0000 (UTC) Received: from krava (unknown [10.40.192.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0AC12579A5; Thu, 30 Apr 2020 09:05:10 +0000 (UTC) Date: Thu, 30 Apr 2020 11:05:06 +0200 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Ingo Molnar , Thomas Gleixner , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Adrian Hunter , Song Liu , Wang Nan Subject: Re: [RFC PATCHSET v2] Implement --switch-output-event Message-ID: <20200430090506.GE1681583@krava> References: <20200429131106.27974-1-acme@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200429131106.27974-1-acme@kernel.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 29, 2020 at 10:10:58AM -0300, Arnaldo Carvalho de Melo wrote: > Hi guys, > > Please consider reviewing, this addresses comments by Jiri in > the V1. small nit posted, but overall looks good Acked-by: Jiri Olsa jirka > > Again, the example provided is too simple, using 'perf probe' to > put probes in specific places in some workload to then get any other > event close to the time the trigger hits comes to mind as well, using > the signal was just to reuse the pre-existing logic and keep the > patchkit small. > > One other thing that occurred to me while testing is that this > can be combined with 'perf report/perf script' --switch-off option: > > $ perf report -h --switch-off > > Usage: perf report [] > > --switch-off > Stop considering events after the ocurrence of this event > > $ > > To remove from consideration the events that end up being > recorded in the ring buffer after the --switch-output-event but gets in > the ring buffer because we process the --switch-output-event > asynchronously. > > Its available at: > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/switch-output-event > > Best regards, > > - Arnaldo > > > Arnaldo Carvalho de Melo (8): > perf record: Move sb_evlist to 'struct record' > perf top: Move sb_evlist to 'struct perf_top' > perf bpf: Decouple creating the evlist from adding the SB event > perf parse-events: Add parse_events_option() variant that creates evlist > perf evlist: Allow reusing the side band thread for more purposes > libsubcmd: Introduce OPT_CALLBACK_SET() > perf record: Introduce --switch-output-event > perf record: Move side band evlist setup to separate routine > > tools/lib/subcmd/parse-options.h | 2 + > tools/perf/Documentation/perf-record.txt | 13 ++++ > tools/perf/builtin-record.c | 75 ++++++++++++++++++++---- > tools/perf/builtin-top.c | 20 +++++-- > tools/perf/util/bpf-event.c | 3 +- > tools/perf/util/bpf-event.h | 7 +-- > tools/perf/util/evlist.c | 39 +++++++----- > tools/perf/util/evlist.h | 3 +- > tools/perf/util/parse-events.c | 23 ++++++++ > tools/perf/util/parse-events.h | 1 + > tools/perf/util/top.h | 2 +- > 11 files changed, 151 insertions(+), 37 deletions(-) > > -- > 2.21.1 >