Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1600815ybh; Tue, 14 Jul 2020 02:08:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyk67oSpRPyM0hicr4I+zG2CHzYyWlsqTXqVR5PS+do++RDRnxOKTUYb85nDAGA+svGeL9 X-Received: by 2002:a17:906:1357:: with SMTP id x23mr3814387ejb.148.1594717737006; Tue, 14 Jul 2020 02:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594717737; cv=none; d=google.com; s=arc-20160816; b=J76HRX5VTISml7vZb9O9CNeC7TNhqfJ1UPoj0r2GE7fJiZo2f7G0yk/O0TpalLDcxN AYtIC0lt61G9suHinkPLKYbg/GS/lUBIWWPBjN6r5NrHDSHPK4oPS25YgKP85Aip/qa0 PB74WpMrAWD+E0gd6w3qX4Zp+yg+DfKGxxTM4P1JmjkVgJZCGqv85e7T4paESYVVuYzy efFG2jS/TbxwlOVaMixv1LRb57ll4itZqFEZ7ORHUVAlfVRR1vlT0VhWpMNjxQFfWVA4 65xHL4EDJVHaHn5fpBxklk3Lik0AwxByfC3NRdVCL65cbx1HKB8p3WMVKOG84RTloaP+ Rrjw== 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=MuNxOJuxqWS6nLW7u6Vf6t3V95a5uVOv2UL/CW9mwy8=; b=VZWhffF61jx/rRY7TTqzR8HDibRxStY+GbT1zIKSPDG+4uTRH1hbbeQiJQAfqjCsxr 9IFIudbDwRcFvOyFL2yIuDabKTAgqWPLaW6qRkJ96k4UVAvp+vqUP9d5K1woEUo/uoZ2 M2AGQ/d4CLls+yRyit/hZhFcZUwhfTiJ792YKRY0ZyQJizrf8U0Fh0bLzrMxxjIrYlLM vGrB/EUdqSpWHhBsxUt8GH46OidcqBPvhl7PB/2dIF7Y3BQoiIQ9rHavxVFiBGIArOkq Svy5y/wv6zonPZ+k31turKvkOQdo3NmOvRsIbQAbA9lFHZyaTIuuLZBhdpTp/v3X6kf9 QldA== 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 y19si10078285eje.247.2020.07.14.02.08.33; Tue, 14 Jul 2020 02:08:56 -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 S1727104AbgGNJFP (ORCPT + 99 others); Tue, 14 Jul 2020 05:05:15 -0400 Received: from mga11.intel.com ([192.55.52.93]:10742 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727103AbgGNJFM (ORCPT ); Tue, 14 Jul 2020 05:05:12 -0400 IronPort-SDR: boeVU5t4SV4mArsN6tZRj1KvTsqctRmzeNSUHeO8jFSlcAnDYCj551N03ziY0mlSxM46oOd2/5 fbatN9kyIuIA== X-IronPort-AV: E=McAfee;i="6000,8403,9681"; a="146857499" X-IronPort-AV: E=Sophos;i="5.75,350,1589266800"; d="scan'208";a="146857499" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2020 02:05:11 -0700 IronPort-SDR: hd17/lg7afTynaMmuYWsnGADa2CuUdGgMigR7ho1Rbevtq4ham9Nb4ixELEAkJ7sSuFgeXQqOF 4LW85DsFkhtA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,350,1589266800"; d="scan'208";a="316326542" Received: from linux.intel.com ([10.54.29.200]) by orsmga008.jf.intel.com with ESMTP; 14 Jul 2020 02:05:11 -0700 Received: from [10.249.230.149] (abudanko-mobl.ccr.corp.intel.com [10.249.230.149]) by linux.intel.com (Postfix) with ESMTP id 8A60E580814; Tue, 14 Jul 2020 02:05:07 -0700 (PDT) Subject: [PATCH v11 04/15] 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: <037d737f-0ada-a9f0-9686-f7521ca6fbc3@linux.intel.com> Organization: Intel Corp. Message-ID: <7a305109-f579-c175-2110-2063b774c592@linux.intel.com> Date: Tue, 14 Jul 2020 12:05:05 +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: <037d737f-0ada-a9f0-9686-f7521ca6fbc3@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 | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index bcbe0cb8482e..36eb50aba1f5 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..fe1fe40e044b 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; /* control file descriptor */ + int ack; /* ack file descriptor for control commands */ + int pos; /* index at evlist core object to check signals */ + } ctl_fd; }; struct evsel_str_handler { -- 2.24.1