Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1539796ybj; Fri, 8 May 2020 03:49:14 -0700 (PDT) X-Google-Smtp-Source: APiQypLwJvvekhC891e+pLnMlQdUtThQxG2VGSqerGLzbfFFUueIY/nmnSfeY34sgscIztjg5QTZ X-Received: by 2002:a17:906:b84f:: with SMTP id ga15mr1371364ejb.83.1588934954393; Fri, 08 May 2020 03:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588934954; cv=none; d=google.com; s=arc-20160816; b=ii1NldTMjSglf79v2eZX3OiWaMFAz/NpAcnrqLguy3MqcgPmNs5ijLr2bq8FtdteAP EILU05cySoSNkONX6lNvHixydtlq9VMv8vAQX4nJvOWinN3ywajst2uKcLPXUI5mn5a0 cNSaGVLF/1OYgT2YFF8w90m6SlyqSzdOq+00EmDFhFUjRTVSBfXh5QpdZJRvlRfYAnxN FdAQjPsTPlWJowM9U5AD7L/w/iMukhcikUVEotZ4OXmKMwinaGSHg/aUB718716mBCCY dWe+Z4sRoQKETSyV7SLNIVotwCAkcJBozoafVV7yyb/8MQxJefEtpeuxWlzb2pZZue2h FHiw== 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:references:cc:to:from:subject:ironport-sdr :ironport-sdr; bh=Dtki7oYTsTznRq5ECI+6qDhAO37DpU1si7lnL03hfUw=; b=mvBTC9XOCkD90OKAS2CCfdlqX8ke5Wx9bqrejQI+FcdSkBFG89TfmM2nqYavYklSkb WvqDQKabV/il/P7wsMH5t0aG5BJ8tlsFYNdkCE1otPynejveTDGu5ax2q/pG6JzSh283 yrgLgg36l8eIUiBuwMWY7S/CLs9vmnidUdOGdwSoXGZLvIVBV/YlRzEd1+tA/yOhyMeD m9wvTYXPs1rar7DmXAyvY7Ppmf0OY/mM9AMGRdkCA8pG9oVCMffdhi33JAu+iobXWJBk IfjnMA4gRnJ3zv5V7s4Vp1LV8unbHBCpWcKcCRGLYET3efbQP/2B/TSl1LvQpXTaiGx/ P4Yw== 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 j19si692110edp.118.2020.05.08.03.48.50; Fri, 08 May 2020 03:49:14 -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 S1726761AbgEHKrX (ORCPT + 99 others); Fri, 8 May 2020 06:47:23 -0400 Received: from mga12.intel.com ([192.55.52.136]:56701 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726325AbgEHKrW (ORCPT ); Fri, 8 May 2020 06:47:22 -0400 IronPort-SDR: Bx3w+PHng0yvQwOZPvYD7nlZmSNPP1IuKU/U4waQZnotDiB4KVzkWxOZR1w17KdmZ39Ihhd7CG 2vjVzCqQj1aA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 03:47:22 -0700 IronPort-SDR: GEENhPV0rRQbWoaJLIp5wOvFjwL6dOAa1IQgo0YkVDwQu9vdx8wPuQScx+zxyk44WoXCS3xFP6 nWkb3YzqOsGw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,367,1583222400"; d="scan'208";a="339677132" Received: from linux.intel.com ([10.54.29.200]) by orsmga001.jf.intel.com with ESMTP; 08 May 2020 03:47:22 -0700 Received: from [10.249.224.104] (abudanko-mobl.ccr.corp.intel.com [10.249.224.104]) by linux.intel.com (Postfix) with ESMTP id 89E535805B4; Fri, 8 May 2020 03:47:20 -0700 (PDT) Subject: [PATCH v3 1/9] perf evlist: introduce control file descriptors From: Alexey Budankov To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel References: <0b63e751-5c45-3311-d930-15f1ebe72601@linux.intel.com> Organization: Intel Corp. Message-ID: <12997e18-56e5-2108-58e3-65d2a4a7e732@linux.intel.com> Date: Fri, 8 May 2020 13:47:18 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <0b63e751-5c45-3311-d930-15f1ebe72601@linux.intel.com> 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 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 0a0b760d6948..2db4bedc4f81 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; }; struct evsel_str_handler { -- 2.24.1