Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp472416ybh; Wed, 22 Jul 2020 05:28:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHQHaMlsqBJ1amvG0eRTijADhcfWTDjQjzZcGuVideykC0JzKQdakof1IOUmnwjNjo4VZf X-Received: by 2002:a17:907:2170:: with SMTP id rl16mr31314487ejb.422.1595420915815; Wed, 22 Jul 2020 05:28:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595420915; cv=none; d=google.com; s=arc-20160816; b=ezZQfiBkp0ghBYH4UiiUV8YAN1DEZuUUCvRnUPy7GM2TrXkwUSTfvdri9LwwjeifnT krClUYEgqDDKrWxJhw511o9l1xsmdE5hwFZyWQdANB1/91AJy7tlEUFMms39TGtb1gJk XSkB72OiG2qYtq7ZPNyJj2nPFrX1UUGuy3Gi3NlPtrUQ9TRO5wjY6VmMYlwzUQ3OD8zM /vkmpByHb4EWBcaSK+Ph5ARco8AkTMH3Ov7B7Ekb3Gs11ml7cAk5AcH7xdzppndew2g7 VmDhdA8Dnxi4V85m8/HgkD6tA7EFEjSWlZcWyIIu4wuunUHqbod0jIoPrZZb2YRZ9Mvb xZHg== 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=ap46n4fYt17DMiO+v+Eg4GtkzR69Mz4trBrxE/dU6sI=; b=0e9mYi5LEVFqjzFCC8IsbVtmC71yskyEExnBeDgi8CP6incfELC2qXiM6UW9f0zxqL Anq6+Mxo+4DS84DLvcf9Y/ZboMfmgx/zh601mUoFmb0HizqIXLVn1S+KYhptvCbV6zvL fVCTx73l5h/A08TGVBGoUmQvFTaR/iUcPrwj/liWlpvqEGsaiajc259MWxzrJvMm3OoH riCOamwX6I//w1qyQ2GaQ347VSMak6aWn+BgzZknhJovj/AS4KnPcAxJwQ/47/PLlEdv xM5nEOnsqs4cuXKV72YJySGYpxJDb9vodVExknUWeVmFw5kQRfAL9yeX8HE+h+SB+42+ FR6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=h66NaUtR; 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 s24si15011636ejd.737.2020.07.22.05.28.12; Wed, 22 Jul 2020 05:28:35 -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=@kernel.org header.s=default header.b=h66NaUtR; 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 S1732185AbgGVM1h (ORCPT + 99 others); Wed, 22 Jul 2020 08:27:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:35356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbgGVM1h (ORCPT ); Wed, 22 Jul 2020 08:27:37 -0400 Received: from quaco.ghostprotocols.net (unknown [177.17.3.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B928920729; Wed, 22 Jul 2020 12:27:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595420857; bh=Fa5CofAQhSoiPsbbQ+uJaJinSOhOGsOMU5AMeRircfE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h66NaUtR3LUv8B6qfuqaJ/9n4sL3iQJDtu8sXbZ2wbnZozp7wDA1NIw2c4TOK5zoM r5uuRdtVkzfVIGVJPKnsMpacaD1Ixa0YiA1bM1YFlPAkDenz893d7cFpL9y5dOR4ms C+cpXmA9eDxek492K7ED/xmqxuOwKTpM2tk4lH8A= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id A8246404B1; Wed, 22 Jul 2020 09:27:34 -0300 (-03) Date: Wed, 22 Jul 2020 09:27:34 -0300 From: Arnaldo Carvalho de Melo To: Alexey Budankov Cc: Jiri Olsa , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel Subject: Re: [PATCH v12 05/15] perf evlist: implement control command handling functions Message-ID: <20200722122734.GJ77866@kernel.org> References: <8d91c3a0-3db4-0a7a-ae13-299adb444bd6@linux.intel.com> <62518ceb-1cc9-2aba-593b-55408d07c1bf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <62518ceb-1cc9-2aba-593b-55408d07c1bf@linux.intel.com> X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Jul 17, 2020 at 10:01:33AM +0300, Alexey Budankov escreveu: > > Implement functions of initialization, finalization and processing > of control command messages coming from control file descriptors. > Allocate control file descriptor as descriptor at struct pollfd > object of evsel_list for atomic poll() operation. > > Signed-off-by: Alexey Budankov > Acked-by: Jiri Olsa > Acked-by: Namhyung Kim I'm applying locally for testing, but can you answer what is the reason for that newline in the CMD_ACK_TAG? I tried looking at previous discussion but couldn't quickly find any reasoning for that - Arnaldo > +++ b/tools/perf/util/evlist.h > @@ -359,4 +359,22 @@ void perf_evlist__force_leader(struct evlist *evlist); > struct evsel *perf_evlist__reset_weak_group(struct evlist *evlist, > struct evsel *evsel, > bool close); > +#define EVLIST_CTL_CMD_ENABLE_TAG "enable" > +#define EVLIST_CTL_CMD_DISABLE_TAG "disable" > +#define EVLIST_CTL_CMD_ACK_TAG "ack\n" What for? That '\n'?