Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2245609ybb; Fri, 27 Mar 2020 01:46:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtYFwIxMHzMceu9UjdwXb2Yp+1k8BRdyeBr49fWIW6EZ3j9OGl8JzsmERlvFB2BbigmLX3/ X-Received: by 2002:a9d:8d0:: with SMTP id 74mr9583675otf.39.1585298812815; Fri, 27 Mar 2020 01:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585298812; cv=none; d=google.com; s=arc-20160816; b=rIr/nz+kqXknN4GUg3ZEs51oRtmrNb3gXIxvBBrQ62vDk1JkAWBtbC3vuFpjk0i0kn rKJTWIc0INBYsN9gWF9z4wj+ux/uZRwKInKuGmHVI2rLvGLR5P37aNrtD5KFGRxDM43x /Pz3JRSlMbAT7haSS3xE0m+nI+did2cOna2n1VgJYh7nz2Lt7Gj+XMNBs/cZ6QwE1BHa YmtzBZwObqnwBfPy+NOGRyuhnj8JqRGhSreGrFhHU7wmfDrT260rWlWOuOunx650zyjA 3EcP12D7e6tEHerjEQAXBsinTrKQjpGzd2h17MMKezWe0i4NzJiKBNMJke3ULMa4m4z/ Uk2A== 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=hfA/bzrJSN3jeWK17Qf3SECNF6xXWeHaFRD7N5L9hss=; b=al1vKBNoRfLZBF2cwpUXcgqzdgd73bday5nqb1dksDr+axF7g3vqxn4vk+Xhpl6vN7 eu5lO+NDxXXlQ1esPbY/ONW2CBMkqYsxWrLEd8vBGYQ2ccQebM8fvcXbFp5kKw0F9Qyc AEw/YIsyTXTyqYDKXYirEu7Qu7YW0LOzt51g+62at5e65W/+np1J2TxRVe2Zr7YDbsaF glJfpPvJtrV2k17pyA/TudXeJ7qpOakNEUQc3Q5H6zxmm/3EasDaMkY3CxEoF+ZYAP+X ypTycU5Ldz4xdf/s/nFaw3GLCGP+3N5zZerbe5Tdo+OJXFHCrLrTYUSoV3QZr9pzzyx9 DUAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id y1si2114516oti.52.2020.03.27.01.46.28; Fri, 27 Mar 2020 01:46:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726900AbgC0Ipm (ORCPT + 99 others); Fri, 27 Mar 2020 04:45:42 -0400 Received: from mga04.intel.com ([192.55.52.120]:4632 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbgC0Ipm (ORCPT ); Fri, 27 Mar 2020 04:45:42 -0400 IronPort-SDR: u+QRmxAWTWeK5KX9XlPNdTjCs2FFgpS0dSK2gvmjZa8F4eWzvyiDkx94UmtgvipaZpVVjCgkqD PQ240+fxgDWA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2020 01:45:41 -0700 IronPort-SDR: a6NT259l81OjGF2jCfp9ZtBYHTbQC4MIdQN8e07YDaSjj1h+3PK/cNb57NyuFbXWu49SYjYIu8 6Sh0z3NJmv7g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,311,1580803200"; d="scan'208";a="293876602" Received: from linux.intel.com ([10.54.29.200]) by FMSMGA003.fm.intel.com with ESMTP; 27 Mar 2020 01:45:41 -0700 Received: from [10.249.36.56] (abudanko-mobl.ccr.corp.intel.com [10.249.36.56]) by linux.intel.com (Postfix) with ESMTP id 057B85803E3; Fri, 27 Mar 2020 01:45:38 -0700 (PDT) Subject: [PATCH v1 1/8] perf evlist: introduce control file descriptors From: Alexey Budankov To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel References: <825a5132-b58d-c0b6-b050-5a6040386ec7@linux.intel.com> Organization: Intel Corp. Message-ID: <61540ab8-bb20-911b-6a2e-8d7b83829d9b@linux.intel.com> Date: Fri, 27 Mar 2020 11:45:37 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <825a5132-b58d-c0b6-b050-5a6040386ec7@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 1548237b6558..1afd87cfa027 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -62,6 +62,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 f5bd5c386df1..ac3dd895ef8f 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