Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2109907ybt; Fri, 3 Jul 2020 00:43:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrC73suBGFjWs2bm3Mc/mu+R6m/8EkbTOJtL+zZdGZn04l1g3gQLIsSkBlrt+664Acp8xh X-Received: by 2002:a17:906:328d:: with SMTP id 13mr31705561ejw.71.1593762227633; Fri, 03 Jul 2020 00:43:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593762227; cv=none; d=google.com; s=arc-20160816; b=ipri4jmMjKdu3xWoYzJWSdC5B0bArqusXb75FCAyczt5iArOFhGPnJxue7wq0fuNuA 40DUlq/Gg1e52jKPvrPkPeYu8M/PKYJK2vQ6ID/EXDooHk4HQ0wMMU3uVtzYmcgdVAEt u16yhSJn3yHTXQgJvz5HjUg87MK3X3HnueS4084LZI1vEjjRzZRsHKUNPaVgyCf64GE7 zfiRi7Y6jsToX5/uyFDMA4RZgocLDZ0J1SGIQ2PoEVjjUqiZVNeTs9e+1KTWDepsll/T 7suk9T42s7mpDc8KKVfNYdI5hk1WQ758Ge0rg0ObFm0tT+QJ35xbiMOYYxzyv4IACsYi ri1w== 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=an/fI797SOjgRTIDKek8LW7j08bqhnBdcqAqygjrK50=; b=VqSTQ+zrmGcOyauyrTDrP2KVK+7LUsqWbiVJE0qukruNBiJEzIXg4h7ZiLtkqALaop Gmv6iFh1NVCJLzAjZdyD7fkVcJxM+RA0eRszdExaC5Uyccc9VFD2X9Npou5MDbnoa6on L326udm6SgdaNFYJdKbDPqh+clKNTqvluSeTrwxeIZhEmmhEuGJPflL/Nwkh6objcdjr QePFS5WEVqf0MKnhxX6zswZhl9QxS6H3tnAkJfeDM8MTyjKHjIUNm4HHtx+H3b3UjXWb LjwU73aZI6SHfi2ExQqV87DecWGBecFvhzQMlD9rKBksIVio6jujsTQFN8Vu/fAUmMre IzIw== 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 i4si7252450eja.4.2020.07.03.00.43.24; Fri, 03 Jul 2020 00:43:47 -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 S1726183AbgGCHnG (ORCPT + 99 others); Fri, 3 Jul 2020 03:43:06 -0400 Received: from mga06.intel.com ([134.134.136.31]:59496 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725984AbgGCHnG (ORCPT ); Fri, 3 Jul 2020 03:43:06 -0400 IronPort-SDR: oRoxPi+IzPIA0RAEDk+7gbVgoK5vMz7B0GyJn4LnrtfXMjK90nipU5qARW9yzfA16+0nkE34sb oOwYo/0RhNcg== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="208625248" X-IronPort-AV: E=Sophos;i="5.75,307,1589266800"; d="scan'208";a="208625248" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 00:43:06 -0700 IronPort-SDR: 8Qmih3QH/RpDAcak/HvY2nMw4NcXX94scNZEqKXz0App8odjnO0Qz/20L2eG56I/CuSsihRdj8 expNcK/dwpQQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,307,1589266800"; d="scan'208";a="304511534" Received: from linux.intel.com ([10.54.29.200]) by fmsmga004.fm.intel.com with ESMTP; 03 Jul 2020 00:43:05 -0700 Received: from [10.249.231.67] (abudanko-mobl.ccr.corp.intel.com [10.249.231.67]) by linux.intel.com (Postfix) with ESMTP id 7E092580784; Fri, 3 Jul 2020 00:43:02 -0700 (PDT) Subject: [PATCH v9 04/15] 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: <662b1c03-210a-1945-c02b-ac6c0445c7c7@linux.intel.com> Date: Fri, 3 Jul 2020 10:43:00 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.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 | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 7b1beffec6a1..ee545a122b52 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 38901c0d1599..2caf19fb87a8 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