Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2154108ybg; Fri, 5 Jun 2020 07:00:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIGxAEbBYES+80JLJHkH/ps9ZgpZIKJp4kSFLUCnF+hpIiAgIJ5ytz9KJ2LhBr/6dvDer7 X-Received: by 2002:a17:906:cd06:: with SMTP id oz6mr9347507ejb.434.1591365607829; Fri, 05 Jun 2020 07:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591365607; cv=none; d=google.com; s=arc-20160816; b=v0GUgeKLngrzuo8K1Wpj8q+gPGhb0pqpFEczZegqOhGrw+2jMLB2jh4WA3uKkQsQBy lHgl3M8e/3kaFscNOcVGSq9/AIEUCTXu933E+puk2oyiUmWKj4Jza+GXfMnMZcI15ZsM C/mh6Nv049asCzp2Qujh5uDfUEEFbQt5qIJRZ6h5fVaDhN4IhSWhw4tQ7BCzWG90KNmX YzE+bfkd4VzOroHbwFENbyihqTm6DBKkrB5BGRZc4SKMO6wGYh/7+GiGAowwIJj0rvH0 rpMn4R5nr3Elr6a9RPURUEpIh2DkpvI2dOJkELPAUawpPIeW2b3au+GzM7Qc+RfitMOp cuHg== 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=w5eDVJxgD5cVe/ws6zJ1B0whChx/Y0OHUlhKYF/6ehA=; b=zVqPuWF0bjXFm5asXzFqE207763iNEE2KlpoPJQr5Swy5+ES3ioraHM1MESaHnMGcU 93Ruxvyj85wPyLHl2viZHcfV77iixe5LjQsaWATl/lO8SXb6IwN4HHFkht7Sod9r5QX1 +HD0USRo7YFA5B/dcak/0YogiMStL5ApQy1EEGL2aKYDP7S1Q6NS4kYHdH69GB9609Uw SNIfHZZtp2ejLlGBUMzPDkZybeommraa/f0tRMMgowKAsWOzvz04WQbgLtEcyDowAvu2 1mKjveST6hEThAoH+ptd2KLybqvBxIKsXZF3phmpCCWe1qDA1n/vNK/l9w3BGP7UFS0I GN5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TVeNlcTl; 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 cb26si3816368edb.29.2020.06.05.06.59.43; Fri, 05 Jun 2020 07:00:07 -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=TVeNlcTl; 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 S1727049AbgFEN5w (ORCPT + 99 others); Fri, 5 Jun 2020 09:57:52 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:26209 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726553AbgFEN5w (ORCPT ); Fri, 5 Jun 2020 09:57:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591365470; 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=w5eDVJxgD5cVe/ws6zJ1B0whChx/Y0OHUlhKYF/6ehA=; b=TVeNlcTlviNs9ZGsdhSjvJQzohpNeYjwt4wYonAw5pfJIk/p8+z2nTWPA/vcjNet8wRaup YJY45Lj5x4d1DJy1xiJMI6Ou/XLUJCfy++becZhmNhCO4voPtrfk3kzaPAA0pVFl9mW7Vm fcDhPRkRY4S1ruPJuk8r1XhSSeUUid4= 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-241-_brcHTJjPUqrm0JjIo8EUw-1; Fri, 05 Jun 2020 09:57:48 -0400 X-MC-Unique: _brcHTJjPUqrm0JjIo8EUw-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 369C58018AD; Fri, 5 Jun 2020 13:57:47 +0000 (UTC) Received: from krava (unknown [10.40.193.237]) by smtp.corp.redhat.com (Postfix) with SMTP id D4D2D8FF60; Fri, 5 Jun 2020 13:57:44 +0000 (UTC) Date: Fri, 5 Jun 2020 15:57:43 +0200 From: Jiri Olsa To: Alexey Budankov Cc: Adrian Hunter , Andi Kleen , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , linux-kernel Subject: Re: [PATCH v5 13/13] perf record: introduce --ctl-fd[-ack] options Message-ID: <20200605135743.GD1404794@krava> 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> <935187e8-6fc8-5f47-b88d-6e8c92a27286@intel.com> <20200605105108.GB1404794@krava> <3ac6d0b8-5fae-348f-8556-4bf7a66285f6@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3ac6d0b8-5fae-348f-8556-4bf7a66285f6@linux.intel.com> 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 Fri, Jun 05, 2020 at 04:15:52PM +0300, Alexey Budankov wrote: > > On 05.06.2020 13:51, Jiri Olsa wrote: > > On Tue, Jun 02, 2020 at 04:43:58PM +0300, Adrian Hunter wrote: > >> On 2/06/20 12:12 pm, Alexey Budankov wrote: > >>> > >>> 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 > >> > >> If people are OK with having so many options, then that is fine by me. > > > > the single option Adrian suggested seems better to me: > > > > --control > > --control 11 > > --control 11,15 > > What if a user specifies fifos named like this above, not fds? > > > --control 11,15,disabled > > --control 11,,disabled > > --control /tmp/my-perf.fifo > > --control /tmp/my-perf.fifo,/tmp/my-perf-ack.fifo > > What if a user wants not fifos but other type of comm channels? > > > --control /tmp/my-perf.fifo,/tmp/my-perf-ack.fifo,disabled > > --control /tmp/my-perf.fifo,,disabled > > > > we already support this kind of options arguments, like for --call-graph > > > > jirka > > > > IMHO, > this interface, of course, looks more compact (in amount of options) however > the other side it is less user friendly. One simple option for one simple > purpose is more convenient as for users as for developers. Also complex > option syntax tends to have limitations and there are probably more > non-obvious ones. > > Please speak up. I might have missed something meaningful. how about specify the type like: --control fd:1,2,... --control fifo:/tmp/fifo1,/tmp/fifo2 --control xxx:.... this way we can extend the functionality in the future and stay backward compatible, while keeping single option jirka