Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp581499ybg; Mon, 1 Jun 2020 08:56:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRUPN9jIuaEiIMoR9Xm6Zhia2z+o0Qs9eJf6YN9dh+rVtcrAQVAdC9nhlFNZEMfRVY1BGc X-Received: by 2002:aa7:d84b:: with SMTP id f11mr22773135eds.288.1591026985551; Mon, 01 Jun 2020 08:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591026985; cv=none; d=google.com; s=arc-20160816; b=PbwNbZjuVlRYqWsq65i1omDHf2H+GbfX6fgGUdt8kM59ELYOlHU9TMl7RD8y2YxqLc wnKh8mMVINm7L3SpZwyib/Gxp4piINJtu57YY1G2zOi+khYJ+dXz/4CkvCraPEQcFNMJ gqC/XA1GFf9AfonMVkcjKkS0ZfVxM91+j+xYDjQhi+MqkFvE3rAcCbc6eOD4TUB7ieJg Qbjlel3sVqW/muwGVEG6XveP+Qgp9tjzVi/acQ7cds0pdZGSfvDsgTd47rlazeujUQpq 7+bj1RY8HlcreF9qByDlO6In1sQv5pm49Piwpv/CRlQUFYdIf0aMWuDry/uKTQzXbyLw en2w== 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=hhEq/MbzQdppAmUQwWquTI38rP+C6W7UMU2PDvyUo2Y=; b=hGk80jurj/bxrlmQX1qf3U5VYig1Yi5ksAoYmHimuH3MkF2oc5iBzmjP2HVhKTHjBG l3USVRKtuvjvxrHaB+xmOsfjaOd/Gw6/+d3IxIsXj715xmPAXagW6tEkVxfp6a4T/xy8 ok15ax5rGTqOcVT2TYOSMiR/0ngMstEXNcICK/oCcqDnXPk0Hd/uB2QKQI9k4v/sWlQ+ 8Po0q7R+FXPJfWeMf8+Nnuv7sSyJ+LyoJfpc3pj9XN1Bp1/sic48/FsSKrqU8Q8Csvui p4XS4M21JDXOyhbjQumESmD+qZ0bK0PlMgQgScZzZnT3o3neWktevbXVnS7sG4xuRn6+ 3UWA== 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 bu16si1922673edb.146.2020.06.01.08.56.01; Mon, 01 Jun 2020 08:56:25 -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 S1727924AbgFAPvy (ORCPT + 99 others); Mon, 1 Jun 2020 11:51:54 -0400 Received: from mga02.intel.com ([134.134.136.20]:23579 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726075AbgFAPvy (ORCPT ); Mon, 1 Jun 2020 11:51:54 -0400 IronPort-SDR: orH7nET1FFlyrmX0oIRdPYWt3Lv5j0YrL2YOq+K5QmzEqQBmFwpiGENUdcjN4BmVoLzHIj+Ebx xIjIZsI918eA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2020 08:51:53 -0700 IronPort-SDR: CoTntLLfTHf6yTa3VfNwPg4rBg+K37HUe0buOAYWs4DRLvuNuq+Aa0pXGXzT78QD1nCuAwNdnW 05kzT6cBRYGg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,461,1583222400"; d="scan'208";a="444334490" Received: from linux.intel.com ([10.54.29.200]) by orsmga005.jf.intel.com with ESMTP; 01 Jun 2020 08:51:53 -0700 Received: from [10.249.230.65] (abudanko-mobl.ccr.corp.intel.com [10.249.230.65]) by linux.intel.com (Postfix) with ESMTP id D7AA8580378; Mon, 1 Jun 2020 08:51:51 -0700 (PDT) Subject: [PATCH v5 02/13] 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: Date: Mon, 1 Jun 2020 18:51:50 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 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 | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 173b4f0e0e6e..47541b5cab46 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 b6f325dfb4d2..0d8b361f1c8e 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; }; struct evsel_str_handler { -- 2.24.1