Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp477324ybg; Wed, 3 Jun 2020 05:54:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMp01ffVwwL8LSMXx1zGmYcN6BVqPZvSnW7+ICsXk/EicGJee8F91G5g8aH5SILJd+OYoC X-Received: by 2002:aa7:ccc2:: with SMTP id y2mr6410961edt.97.1591188894368; Wed, 03 Jun 2020 05:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591188894; cv=none; d=google.com; s=arc-20160816; b=0Ea/bmZSaVEAqDgZgwtcs0Pxj41S+g6QTicjhy+R5gXFw7svdSMDhvlrZIHsKb2jKc fZR06SOHAY6tAgZm1Hw96Lg+25ra4casIURyen8JW4jmpoFlA/YglSUDUWm/DYjMTbj+ bzXp1oDHDLnkKVOW+VBWfBqPhvPRcMIAeay3B+tuWBT1pfe3lt1Mn+BJUiajs7ILvfCt BzDypfYT+Kxw1RQgFz7KrkI5RTCyovvAj5PZk7WjFqUa9lXGtQICZIlJWOk8+ugG7fzK Arahm4KoiE1xewa8NeagEPZlHPAXwC6LNydg1kJpLHhPrYWlad1Bwi1+qcgly/epTEiu vH7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject:ironport-sdr :ironport-sdr; bh=iFD9VPn7OzCNRgAg0DAyLnyAAd1L8Uo0vxLbPWgIJWE=; b=frOFuHVm1qNwmNS1M6fRQiTpxHxgNO+uEsdfc2VEep+yUO2K3tuP6dsaFBUUQvtQM4 XXT1qj7pkEAXzWS8chsRxBFeVGz4qjHr52v8ficyNxvb4avrkjUcdSJ8zUCalLPDEGb5 1kNow05NUXTVBpErzfq+JO59d1YQBrblPj7CnhsJQb93rS5JCh71UqwzhUCjN/J9qv8F H3ondNohHWh2xy8QHm7e47GY36TqztfEYVP6G7qGr/In6RZPvNOYOIhNGr9Jv06kUZlW bumunH7bvKmwbXmuRlo0uHqqUsFAIrZVsPw6/NrXOKwO9RkHHaBE26jamzXJbtB0+3Wn 7gmg== 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oj22si1067599ejb.115.2020.06.03.05.54.31; Wed, 03 Jun 2020 05:54:54 -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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725973AbgFCMwn (ORCPT + 99 others); Wed, 3 Jun 2020 08:52:43 -0400 Received: from mga14.intel.com ([192.55.52.115]:10553 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbgFCMwl (ORCPT ); Wed, 3 Jun 2020 08:52:41 -0400 IronPort-SDR: irxi7yCc99vDTKUOxMIOBvcxH5VN+uHdJ/6qcaqutJ4WJT9grQSRAnLe3J2C/KSgcrUdR/Xmgc sYpcQwpvhj3w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2020 05:52:40 -0700 IronPort-SDR: n508GLROkb2f5DO81n+WQ12yzA4hWL7jUjsBE+j0nm+38Qi1Tw3YeolIXKfQ93rzfF+3cLegSg KOLpfzZnrnuA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,467,1583222400"; d="scan'208";a="304595107" Received: from linux.intel.com ([10.54.29.200]) by orsmga008.jf.intel.com with ESMTP; 03 Jun 2020 05:52:39 -0700 Received: from [10.249.225.188] (abudanko-mobl.ccr.corp.intel.com [10.249.225.188]) by linux.intel.com (Postfix) with ESMTP id EBD785800E3; Wed, 3 Jun 2020 05:52:36 -0700 (PDT) Subject: Re: [PATCH v4 10/10] perf record: introduce --ctl-fd[-ack] options To: Adrian Hunter , Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel References: <653fe5f3-c986-a841-1ed8-0a7d2fa24c00@linux.intel.com> From: Alexey Budankov Organization: Intel Corp. Message-ID: <17506256-ef3d-e3a2-a655-a9059b652785@linux.intel.com> Date: Wed, 3 Jun 2020 15:52:35 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03.06.2020 15:05, Adrian Hunter wrote: > On 25/05/20 5:23 pm, Alexey Budankov wrote: >> >> Introduce --ctl-fd[-ack] options to pass open file descriptors numbers >> from command line. Extend perf-record.txt file with --ctl-fd[-ack] >> options description. Document possible usage model introduced by >> --ctl-fd[-ack] options by providing example bash shell script. >> >> Signed-off-by: Alexey Budankov >> --- >> tools/perf/Documentation/perf-record.txt | 39 ++++++++++++++++++++++++ >> tools/perf/builtin-record.c | 10 ++++++ >> tools/perf/util/record.h | 2 ++ >> 3 files changed, 51 insertions(+) >> >> diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt >> index c2c4ce7ccee2..5c012cfe68a4 100644 >> --- a/tools/perf/Documentation/perf-record.txt >> +++ b/tools/perf/Documentation/perf-record.txt >> @@ -614,6 +614,45 @@ appended unit character - B/K/M/G >> The number of threads to run when synthesizing events for existing processes. >> By default, the number of threads equals 1. >> >> +--ctl-fd:: >> +--ctl-fd-ack:: >> +Listen on ctl-fd descriptor for command to control measurement ('enable': enable events, >> +'disable': disable events. Optionally send control command completion ('ack') to fd-ack >> +descriptor to synchronize with the controlling process. > > You should also explain the use of --delay=-1 here. Well, possibly like this: "Listen on ctl-fd descriptor for command to control measurement ('enable': enable events, 'disable': disable events). Measurements can be started paused using --delay=-1 option. Optionally send control command completion ('ack') to fd-ack descriptor to synchronize with the controlling process. Example of bash shell script to enable and disable events during measurements:"