Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp53172ybj; Wed, 6 May 2020 11:22:32 -0700 (PDT) X-Google-Smtp-Source: APiQypK24nVHsIndn6CEeVmeWqKYSt1FOfE8FjiAo+IQVFNWBC7ogdEFgjBKAImEqrYnIEngP1wY X-Received: by 2002:a17:906:ce4b:: with SMTP id se11mr9068897ejb.178.1588789351946; Wed, 06 May 2020 11:22:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588789351; cv=none; d=google.com; s=arc-20160816; b=dWxaWgSDt1yn0F62ciSM0Dx/qbIy7bLY5QY5UhFy6sjqyTQZ8Zb5cY+TyJvnZcnt9+ A2UQN1zX9OF5DE9ZEGhx4Bw28R2edCjxFQMbVVfvQQc2ber0Wivlev31KKX7FoRZyHel lGvbuNJqXDD9RNFLKm0s0aPDEj9tOfHvLqJGx/mha4onRPr50pAPZdDKKhkCsIfBrll3 1toI1Mx6xUbEnHTH2XGTxIZtm0+whdNkiLHJR5K+2x99V6qOz3fUN8zTo0tgM2pGCz1C 72Zq9PXgLIboUKao1FP2n+ZLJlGEjzJwNA+ADqNAdgFGTUyPRl3WDviwG6XSbRwRGDwI XDHA== 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=G4fWJo9s/RAwCBWtAzoK1LHhJP/7zWoqwNaLEO23nyFt1NNABrDnFEsTh1aD8wAYas ykRpxGvFK4VxahSB8Bb7sWIWoeFFMAym8fHW5tlgxw1r6lLN40vUyUrnKPKFjfaRl9yF w8rG8yCkIR364PxQyne9a5xlg+VVO3OdHnP86oRPOlRj6sOO21aQDDrjjDKitws952Nf YcIa+2OB3SmlYT+ynCNIIhA0r0p5VwRxLLiBkWFiBwP4ZpeQTcKisGt3Pwc7+9D6vXZq ecpEv7jxx0aEKhEmxzF72F57AT01ZJPU4Qa38EVPoV4jFtVDLjEzIxkn5VsEbqM3GEwC FB0A== 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 u19si1141042edi.518.2020.05.06.11.22.09; Wed, 06 May 2020 11:22:31 -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 S1729995AbgEFSSV (ORCPT + 99 others); Wed, 6 May 2020 14:18:21 -0400 Received: from mga14.intel.com ([192.55.52.115]:64570 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729442AbgEFSSU (ORCPT ); Wed, 6 May 2020 14:18:20 -0400 IronPort-SDR: rELez/RorY2Tw/xTGIUBrnLzY8eRR05djToOSkN7t/3DhHK+M7jgOR+gdAgfLY4fFNGDe59dJh DYeHdCwxZA6w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2020 11:18:20 -0700 IronPort-SDR: Kd+IakREx/udPMxc4lSjTj0wbWUhve53xAvj0g7tGbAI8X7ZZZESZ4IKETpp3HzF7MiSrs8J9W ZOO5XAwfaahw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,360,1583222400"; d="scan'208";a="304875781" Received: from linux.intel.com ([10.54.29.200]) by FMSMGA003.fm.intel.com with ESMTP; 06 May 2020 11:18:19 -0700 Received: from [10.249.228.227] (abudanko-mobl.ccr.corp.intel.com [10.249.228.227]) by linux.intel.com (Postfix) with ESMTP id BB25C58048A; Wed, 6 May 2020 11:18:17 -0700 (PDT) Subject: [PATCH v2 01/11] 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: Organization: Intel Corp. Message-ID: Date: Wed, 6 May 2020 21:18:16 +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: 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