Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp617738ybk; Wed, 20 May 2020 07:51:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBUMpugCVwFxBLcnPsQDGbF4IEzxCQ0yI9n5Y6t4sThbnGSgSUtAyUPZGyAX0ojTlVo8yT X-Received: by 2002:a17:906:70d:: with SMTP id y13mr3788295ejb.99.1589986283508; Wed, 20 May 2020 07:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589986283; cv=none; d=google.com; s=arc-20160816; b=P4/qEMT+3o834yHBtaVOJZByXF9MC1w2fYymiuRxnSFKeLYx9EdUMWLYSMUQjQdNaH IRHUFZFHRTMoQ+sPyLQgb28Df5MagtiFxowMF9NXx9LlnurLwkgDLGMe0Ba3zYspVgrm lDT+Rg1XMjAmSBBhM1HeFnpp5skkVsOoHzmW8kHELjYZ33h9Q6NT0Tdj/kmkMxxLVx9F FNptviYiNFaXK5asK8WJAnPrxUdjSov82MUDn7zcNmZc0M7dYA8gLV9vAcw3yDW4yx0W ewvWKlrhoKf7txItlHiZT86NrnbswN7hoPktKZ1WsjMxwI4rToW5m13f1l5iMQW2SIGX QFug== 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=kqTPaYmyM/d3ihKgsB2oN/2kTIdp8rDHZTRhj1uUmPc=; b=WUKfZU+I+bu8ShyhqHqJSjR+EbTAJOMFPgRsM7BwwatKAAGs8V4bRziMzYY3jWLAy3 OfzO9NmwTLIrbz7C+IGBn+JhCOqGZxKLzWZ++ZS2RgrSUwGfHbk9Zf4r8iUs3cNPVZSx TSYVRbD/QcsaPFnr/o7VmkEEJvfG7wO0D9i+onFDhvI4Z6vF5igbth5qSv2yaTTEspl9 AIVtQOWv7mryn3G/h9Vw3dnqAqboXonYazcLbUfqiuQjyY++b/XsROhNiA2vQqDYFIT/ oIjCB/m1tZ4AkdzwcCAaNUzGIrp4oKNZg52NSNn7c8YQv84r1cuTwNxJ3bliuBAk2YuC 514A== 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 m14si1573824eda.97.2020.05.20.07.50.59; Wed, 20 May 2020 07:51:23 -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 S1726566AbgETOrB (ORCPT + 99 others); Wed, 20 May 2020 10:47:01 -0400 Received: from mga02.intel.com ([134.134.136.20]:50501 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726545AbgETOrA (ORCPT ); Wed, 20 May 2020 10:47:00 -0400 IronPort-SDR: w11a6iwJ1Py6Vv9EsuceJ8Xdm6qVBZ88lkkBm9wkB8smePCIokYRkLwduXxhynn6gbYq2X0HtX po7F/alY5o0g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2020 07:47:00 -0700 IronPort-SDR: oKRv2y8SWDLopxIJN3wcCg5nqdIpcC5a2TlDCfDxonjS+9W+K7wxWfryHtxJRI1weBt/51C1Rs dc65wiMds2sQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,414,1583222400"; d="scan'208";a="289377938" Received: from linux.intel.com ([10.54.29.200]) by fmsmga004.fm.intel.com with ESMTP; 20 May 2020 07:46:59 -0700 Received: from [10.249.231.6] (abudanko-mobl.ccr.corp.intel.com [10.249.231.6]) by linux.intel.com (Postfix) with ESMTP id A7543580100; Wed, 20 May 2020 07:46:57 -0700 (PDT) Subject: Re: [PATCH v3 1/9] perf evlist: introduce control file descriptors To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel References: <3a1ed73d-6d11-eeb1-0897-476c5367369d@linux.intel.com> <20200520123826.GF157452@krava> From: Alexey Budankov Organization: Intel Corp. Message-ID: Date: Wed, 20 May 2020 17:46:56 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200520123826.GF157452@krava> 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 20.05.2020 15:38, Jiri Olsa wrote: > On Wed, May 13, 2020 at 10:59:00AM +0300, Alexey Budankov wrote: >> >> Define and initialize control file descriptors. >> >> Signed-off-by: Alexey Budankov >> --- >> tools/perf/util/evlist.c | 3 +++ >> tools/perf/util/evlist.h | 3 +++ >> 2 files changed, 6 insertions(+) >> >> diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c >> index 2a9de6491700..aa61619fa304 100644 >> --- a/tools/perf/util/evlist.c >> +++ b/tools/perf/util/evlist.c >> @@ -63,6 +63,9 @@ void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus, >> perf_evlist__set_maps(&evlist->core, cpus, threads); >> evlist->workload.pid = -1; >> evlist->bkw_mmap_state = BKW_MMAP_NOTREADY; >> + evlist->ctl_fd = -1; >> + evlist->ctl_fd_ack = -1; >> + evlist->ctl_fd_pos = -1; >> } >> >> struct evlist *evlist__new(void) >> diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h >> index b6f325dfb4d2..62f259d89b41 100644 >> --- a/tools/perf/util/evlist.h >> +++ b/tools/perf/util/evlist.h >> @@ -74,6 +74,9 @@ struct evlist { >> pthread_t th; >> volatile int done; >> } thread; >> + int ctl_fd; >> + int ctl_fd_ack; >> + int ctl_fd_pos; > > we are using the anonymous structs to keep related > parts together like for workload and thread > > could you use it in there as well? Accepted in v4. ~Alexey > > jirka > >> }; >> >> struct evsel_str_handler { >> -- >> 2.24.1 >> >