Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp328809ybk; Wed, 13 May 2020 01:01:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxv7bkHcdFJN7v/vIPl29kyx5bPqklMMmuqqILOd6fsXxbwolDmpmkB5XCGd9wXQh78mXQo X-Received: by 2002:aa7:d492:: with SMTP id b18mr8878002edr.28.1589356911332; Wed, 13 May 2020 01:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589356911; cv=none; d=google.com; s=arc-20160816; b=MCCra9DSl6aooZWOCScXtkgF1nqCvciKjSvUiXIJcGBy7ymn2m6jE38Fgw1uq27qxt jIlP3aKt3ZDQaEhdBw2bhN3twPaHSZVw5B0eMCCZPzVNYel7Vm7d3oEyWD+RlMivChld o/TSySQ13ijazHdzH1nbdhOILaMcvxwBmMMtO/egWwCEXAGZRbjozBDmMtldSZaP2Lkh WELCS+Gd8Q6Wx5zHPh9tU7bqKdX2unDGAktepKRvZMGs8C9Y8bcyJwNWwFQ/5vxlW1x7 zE/MwiS0kc6SZEgP1hBwIpDivJSJxAnm9yH2J6rPWERgZ8JQ2V4u1F/p1ZX+rbJXKEwF /t2w== 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=64sccdhvtLvTRX/j/VAzjVwQNXo2kkjMU65sP6ek+es=; b=l3C1hE180U5P28ds7c8NAO40ycdwqST/40cVonyRaIoX3M16ojqGxvxjTYQO6QILEA x0tHLduggb33i8DY1s1/nIesFOuqLsQuM7Ii+Gcn8Av6NUDmbYvgBKDD8q1w60yWdjuD YH5nn9AwoAB4ZzJikCi5Y1k+sjBYKxNWXuJBE1r5/Vdw2wUXGz7DHJkElQmPZroOG3hw w+gBK7yPmIrOwESI9lFvlQeY2W6HE2EVYjc7D+7d9XRdXnTE1D8Mvz7ArKE3YYgiWe2N Iw4dP6VnIGVYxMdKPom5Zr2wm7u/bgXV2cP+OqE1B5mBMvGceuKVUliVWO4fATWIRB8G BBVw== 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 d16si357740edp.315.2020.05.13.01.01.15; Wed, 13 May 2020 01:01:51 -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 S1729539AbgEMH7G (ORCPT + 99 others); Wed, 13 May 2020 03:59:06 -0400 Received: from mga01.intel.com ([192.55.52.88]:38680 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729414AbgEMH7F (ORCPT ); Wed, 13 May 2020 03:59:05 -0400 IronPort-SDR: wNfIRE1jMljPlmNHm2wdCfDLmpGodOO3PabYxqHlryGZcUVlSffvqb0yZfmUiLfiOCWZMS2S0O RY3f6C6ffLbA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2020 00:59:05 -0700 IronPort-SDR: HwCit9R4NWCsaPtekFwG7g6NC6DYhgKo0K6dVebYNbg6R9CfTBVyBMch/MjbMV5RkKnSD7J0D0 FLrLY/WRUcgw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,387,1583222400"; d="scan'208";a="265783587" Received: from linux.intel.com ([10.54.29.200]) by orsmga006.jf.intel.com with ESMTP; 13 May 2020 00:59:05 -0700 Received: from [10.249.229.18] (abudanko-mobl.ccr.corp.intel.com [10.249.229.18]) by linux.intel.com (Postfix) with ESMTP id DA127580646; Wed, 13 May 2020 00:59:02 -0700 (PDT) Subject: [PATCH v3 1/9] 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: Organization: Intel Corp. Message-ID: <3a1ed73d-6d11-eeb1-0897-476c5367369d@linux.intel.com> Date: Wed, 13 May 2020 10:59:00 +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 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; }; struct evsel_str_handler { -- 2.24.1