Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1136470ybg; Tue, 2 Jun 2020 02:14:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz991wGekCfrJ9jz1rktmw6qFc699Ku7ur3usS3RijY1E4uRs3GjAHAMg9mtvLk94P2AecR X-Received: by 2002:a50:9b42:: with SMTP id a2mr17847384edj.57.1591089271511; Tue, 02 Jun 2020 02:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591089271; cv=none; d=google.com; s=arc-20160816; b=cqF4mY3xAJ/UUbTfy37SqCrEaQtqYK1coteb/tJzB1r6UYVFRefTTCe4D8CmmYOCDH MTzVbCzsfQ+loksf7CEMZ/7zEAUv7fRCw6NKTqGX113py3hbJGPGBsFMEWZXymRJIcr+ NO5ig74OfxVZOVN7Yc07YcIHoVZxBnhy+Y9EuIWgW5HPGH2J8HBcdSbFf1QGzI2vvi0/ MaubSlsXr6MKk2ggbB7IQ/BCyC2m7d43SDqOwAr4LPiR8bf5WMyGFbhr2+qoqe+4qBc4 /Tu9sgkuk/ID1fPxiVyCSAcd3N0L78OtzLfge4H4oQuvXgX+6tmiPPYRiPsFGYcj7smq 0wXw== 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:references:cc:to:from:subject:ironport-sdr :ironport-sdr; bh=Wk9ld3t3snFj8Je69CswpAQwWqNIGHqnWcRums5AYDs=; b=gszZNeEKrarI+fq7U7GI/+lghGIvqgEKgqY5yKtf2YgZaNsst/6S9oEXBJuGoOkLDr dCzXM1TzCKAaQxd98efF9VFcgg1K75e6goQhHrlS6qR4ryfXomH2QBOkzo8pfjPBRZqa 8CoG1TDvQqHDKhZq3/L6ep5nSK7cTnQDmIcYRC6GD9W2Kr9gU9SVHdRVGp/QjU0YKizO Oo5UzVm0djX+elnLIpZ4y1BDmNG5FQ3KojRrSyETThmBTk7Im04iMfCpoRTkYIDlJ2u8 O1mNItxvKmInI5hgEWFMG5nEWheEjekF1KysmZYdXHcjAN9coR08S8jae1GZTqlDIOa2 XmfA== 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 fi11si1133376ejb.612.2020.06.02.02.14.08; Tue, 02 Jun 2020 02:14:31 -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 S1726542AbgFBJM3 (ORCPT + 99 others); Tue, 2 Jun 2020 05:12:29 -0400 Received: from mga11.intel.com ([192.55.52.93]:4256 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbgFBJM3 (ORCPT ); Tue, 2 Jun 2020 05:12:29 -0400 IronPort-SDR: 9272hOyBVIKQKnhaUvpbcO92uJ27rfoHWw078CkkPb1QMrOXdLdHs9CnbuQ4X2usF3avZj+Waw ZgC8Kou/N3Kw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2020 02:12:28 -0700 IronPort-SDR: mt9SSOUWPxTwTSF/pJO9iY+NFm/SjMVMowH2YeaFeDWsfCeU/VMAaJAOhjAyQBNnR2v7WTOLGG 0m+OmG+X2yvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,463,1583222400"; d="scan'208";a="286589056" Received: from linux.intel.com ([10.54.29.200]) by orsmga002.jf.intel.com with ESMTP; 02 Jun 2020 02:12:28 -0700 Received: from [10.249.224.186] (abudanko-mobl.ccr.corp.intel.com [10.249.224.186]) by linux.intel.com (Postfix) with ESMTP id 0A06758027C; Tue, 2 Jun 2020 02:12:25 -0700 (PDT) Subject: Re: [PATCH v5 13/13] perf record: introduce --ctl-fd[-ack] options From: Alexey Budankov To: Andi Kleen , Adrian Hunter Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , linux-kernel References: <8ffc9f9f-af58-deea-428b-f8a69004e3cb@linux.intel.com> <923c40c7-7c0b-9fad-314d-69e7acbee201@intel.com> <937c8cc1-b4c2-8531-3fa4-d0ad9df6a65f@linux.intel.com> <20200601233732.GA691017@tassilo.jf.intel.com> <1bc7c72b-9d78-5184-a27c-8025beadaaf0@linux.intel.com> Organization: Intel Corp. Message-ID: Date: Tue, 2 Jun 2020 12:12:24 +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: <1bc7c72b-9d78-5184-a27c-8025beadaaf0@linux.intel.com> 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 02.06.2020 11:32, Alexey Budankov wrote: > > On 02.06.2020 2:37, Andi Kleen wrote: >>>> or a pathname, or including also the event default of "disabled". >>> >>> For my cases conversion of pathnames into open fds belongs to external >>> controlling process e.g. like in the examples provided in the patch set. >>> Not sure about "event default of 'disabled'" >> >> It would be nicer for manual use cases if perf supported the path names >> directly like in Adrian's example, not needing a complex wrapper script. > > fds interface is required for VTune integration since VTune wants control > over files creation aside of Perf tool process. The script demonstrates > just one possible use case. > > Control files could easily be implemented on top of fds making open operations > for paths and then initializing fds. Interface below is vague and with explicit > options like below it could be more explicit: > --ctl-file /tmp/my-perf.fifo --ctl-file-ack /tmp/my-perf-ack.fifo Or even clearer: --ctl-fifo /tmp/my-perf --ctl-fifo-ack /tmp/my-perf-ack > > Make either fds and or files provided on the command line. Implement file > options handling callbacks that would open paths and setting fds. Close fds > if they were opened by Perf tool process. > > Adrian, please share your mind and use case. > > ~Alexey > >> >> -Andi >>> >>>> >>>> e.g. add "--control" and support all of: >>>> >>>> --control >>>> --control 11 >>>> --control 11,15 >>>> --control 11,15,disabled >>>> --control 11,,disabled >>>> --control /tmp/my-perf.fifo >>>> --control /tmp/my-perf.fifo,/tmp/my-perf-ack.fifo >>>> --control /tmp/my-perf.fifo,/tmp/my-perf-ack.fifo,disabled >>>> --control /tmp/my-perf.fifo,,disabled >>>> >>>> Regards >>>> Adrian >>>> >>> >>> Regards, >>> Alexey >>>