Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp675285ybh; Sun, 12 Jul 2020 20:15:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgCxt7enKfiPRps4lVxEgYkIuA3ANOMmUdhD0jfywRdc6KohcXOctpHKgEgwW23hA6vmmY X-Received: by 2002:a17:906:a28b:: with SMTP id i11mr70632277ejz.524.1594610124146; Sun, 12 Jul 2020 20:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594610124; cv=none; d=google.com; s=arc-20160816; b=04NUh5DnpB/39Unvdsj4q55LrxUoJXr5tXVBaBCYY2KyDH1yu+Cy1aAsOsijWSEb8h FdXmvBLdt0x9B/QFdMhoN4mV0kE5XBd7hyQVh8/ZCR0ss+ayob//MZC0HKbMoz3bJF+8 4ZkT347+2GetQrFQuIdOVHwmBHq1ntg1fWqoKOzPUxFZ8k35fN1DCrqpLlD0WOjk2+39 9HJDp/zZ+aZcADJbNUEh45B15E7xQakS5pEna8qcV0ZqdzYeZ11P+ZPC1TxhUyFDpA79 yFGIGb8CHAbtM+IIUWloHP2wX2cpvYb3IuI0/TpAbtt0ICg88jxf12pVwZlbK2SkOEmO hTuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=YLnrLBJ5kAqFkLfTkdCmiKFDQ8GCKWsQrIBx+rJIfFU=; b=UXSNgyqUfLWk210nxyl5N9YbSNCayisRQtMp2VjJlK51w8pzItzbPqA2WUsdc78CHd JWtDjMxcZstXRT28hKSKmcpUOLi9920jIIYC8FxXsoA4eswDddWDvbH8QksWyo8clHrx djA/+Uvhs8Is4ir9Vt9SLCV2g/xLcyKEOUC3PDw3UpIWWD0IwS4DyzX7Bi4JuLtt8dA7 qbULNWxAS6fPiUURV4rd4RnmOe6YhFcUhOiMcjUmPGSIRlQqNjVvEBI3pQOCCvyLxfji JNDm6lGwlneQCTpM5wASL9KaamCBdiSC3xr9UKl49mWuVWjGjl/hZc33rhoUstjTGIWW /6Pw== 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=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 bs1si8373036edb.418.2020.07.12.20.15.01; Sun, 12 Jul 2020 20:15:24 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728368AbgGMDNr (ORCPT + 99 others); Sun, 12 Jul 2020 23:13:47 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41444 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726465AbgGMDNr (ORCPT ); Sun, 12 Jul 2020 23:13:47 -0400 Received: by mail-wr1-f66.google.com with SMTP id z15so13318505wrl.8 for ; Sun, 12 Jul 2020 20:13:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YLnrLBJ5kAqFkLfTkdCmiKFDQ8GCKWsQrIBx+rJIfFU=; b=t7JemFm0Xh0U257Q2Fhp5VnRJfRNSGyoLDCJ/PZ+rWizpXTzH5qnwjp6ZxV1vd/fQV cn219BmFvuCaddOhcVo+1FxOgR6BgShMnBqJw+mSPB3E0DU1Nm+sVn4j4zRwm7rbkdcl aMsH+tNjB09J7kLexmrtOXvKuMON8XsJScnKd2CYCB9NQhjb+Z0YlwdB0myC3GNjdqOr tqbjdYAOtnaaCzEnuGLcmqYWfGxgSAbI/qnu127es/2DCKx8sDMefaCm5LILund1cN+w VJhG/xDA4Feg2+EaKZdJ/I7mtrEdbY8Ok9mC6hPv83V3cX2nY+RPUP5zr1ikJ65tBAkA 8DgA== X-Gm-Message-State: AOAM5327l+Xj7WjeCTDct/dZbhEttswo3JZ5HagxFV+zvkSy0Ulb6tCu GQmNXc3emZbxwxYmISNvmHapZ9+/fkTqhpyHJHE= X-Received: by 2002:adf:e901:: with SMTP id f1mr77862227wrm.80.1594610025296; Sun, 12 Jul 2020 20:13:45 -0700 (PDT) MIME-Version: 1.0 References: <4af50c95-36f6-7a61-5a22-2949970fe7a5@linux.intel.com> <92aa73c7-4148-a45d-6964-983fe1654d1e@linux.intel.com> In-Reply-To: <92aa73c7-4148-a45d-6964-983fe1654d1e@linux.intel.com> From: Namhyung Kim Date: Mon, 13 Jul 2020 12:13:34 +0900 Message-ID: Subject: Re: [PATCH v10 04/15] perf evlist: introduce control file descriptors To: Alexey Budankov Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, Jul 8, 2020 at 4:47 PM 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 | 5 +++++ > 2 files changed, 8 insertions(+) > > diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c > index bcbe0cb8482e..36eb50aba1f5 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.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 38901c0d1599..2caf19fb87a8 100644 > --- a/tools/perf/util/evlist.h > +++ b/tools/perf/util/evlist.h > @@ -74,6 +74,11 @@ struct evlist { > pthread_t th; > volatile int done; > } thread; > + struct { > + int fd; > + int ack; > + int pos; > + } ctl_fd; Could you please add brief descriptions for each field in the comment? It's not obvious to me other than fd. Thanks Namhyung > }; > > struct evsel_str_handler { > -- > 2.24.1 > >