Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp520434ybk; Wed, 20 May 2020 05:40:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLPCO5Vo4nizPhghN8Q0xH+42MSDnli0TxzFUbBLiPNTUsLv63Yth7viqQ2TYdTbMDIqK1 X-Received: by 2002:a50:fc83:: with SMTP id f3mr3351472edq.138.1589978422160; Wed, 20 May 2020 05:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589978422; cv=none; d=google.com; s=arc-20160816; b=sHnEoEJlOCgxDJEVKI771qdhft1xI6ltZCP9VEQCj/g/oQQI+EOkDT7/j46tgmhW1b yFOAokFp9lQVkiYhqdPqNH4/1OEw1+73B1exBD0LrhPtRzxpNlv7KgYMC4CNyk3qIniT IOOj6h2I+axJMoVTncUwCNoWIRwZ+1Wyz8YZkE4bzJBtHt3puqmukfym2W571oonKngh ORPMSco+2aQG5D13JPhbNEmR1D8LcJmCJUD09KY8wo7eTR7Jivaehl2dn9qVLbHtd6Wi 477p6dPCQXD7xNwXrkx9Km/CK1T1jvxtYGAgCn6mII28e9o7AfkMtpK05AcuwMUK7cJA 1/NQ== 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=LpPWcWre6erap/QD2kzhcgnROeHj6DcH9s7pJSk+zGI=; b=J1scLK+fzmHx8FTn82+5QSOHNG0e3JlODFdaKB/RQF9yW2Nc1Sg8I7zvaaqgL9bFC0 TDP6vfn74jWWpZkHnfjn7yjVKxmILqQa5wjMgl6Ji/oM/jFP4YbIWNPN0Nb6/d/MQdzF TuvHZIGLTz3nWK+Rli+x0gAsvs1U0mfKng7OgUwilY+9lYQIcoDu9xTHetMrdCzCCNN+ hBX1/jVBWxZIi+cjnVDfu0oMQ6FJo7LAbeTV0zMLkbbr9qlenVMz4VjPQzyamT05WtFw ldURXTjPmsc9F3KkiZV0mlFe1gvgDXPwZnQuCOrNfviNOhV4SGnk4tiXyknIpM7AMg11 rnWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="cUB/8DCd"; 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 o23si1355898edi.265.2020.05.20.05.39.59; Wed, 20 May 2020 05:40:22 -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="cUB/8DCd"; 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 S1727011AbgETMih (ORCPT + 99 others); Wed, 20 May 2020 08:38:37 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:38618 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726224AbgETMig (ORCPT ); Wed, 20 May 2020 08:38:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589978315; 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=LpPWcWre6erap/QD2kzhcgnROeHj6DcH9s7pJSk+zGI=; b=cUB/8DCdtMakN+YiNzy2S1yPkNNvv+093diOFg4UYrcBp0FRqflCatrXzCifzIKr91mGo+ vXRS07zto84O0jJ4FRVfE/2munwMaXM8kLxlEuV01+FZMp43f8aks5RYnOnkr4olsad72Q yzDoR97Nmm2subGoNw+8714r1xMc7kg= 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-199-Om-U037cN32Ar2lv3zo5WQ-1; Wed, 20 May 2020 08:38:30 -0400 X-MC-Unique: Om-U037cN32Ar2lv3zo5WQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 16659835B51; Wed, 20 May 2020 12:38:29 +0000 (UTC) Received: from krava (unknown [10.40.193.10]) by smtp.corp.redhat.com (Postfix) with SMTP id 485C91010403; Wed, 20 May 2020 12:38:27 +0000 (UTC) Date: Wed, 20 May 2020 14:38:26 +0200 From: Jiri Olsa To: Alexey Budankov Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel Subject: Re: [PATCH v3 1/9] perf evlist: introduce control file descriptors Message-ID: <20200520123826.GF157452@krava> References: <3a1ed73d-6d11-eeb1-0897-476c5367369d@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a1ed73d-6d11-eeb1-0897-476c5367369d@linux.intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? jirka > }; > > struct evsel_str_handler { > -- > 2.24.1 >