Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp1108329ybs; Mon, 25 May 2020 07:23:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvUw2XvvZ8inP8FlAote31POBmL4aclMI0YRjDFThPFXnhbiYC9qIm9XNNGoE54vEFM+ez X-Received: by 2002:a17:906:3943:: with SMTP id g3mr18400074eje.489.1590416580285; Mon, 25 May 2020 07:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590416580; cv=none; d=google.com; s=arc-20160816; b=eayF6YXAzveULAfbZSJyaFKwmoUsxeI3R6gUBoeHFpQ8nd2H1m0OtM2vncafY/P9+6 vYxpwdMTWdxvGu9rXQvOzWeG0xExrIcvW+ReIvzb02j7kaUJUv/qevyX6lK8vZ0BeQRf tsyV7lWOJAyR8Gm5068bsVV/VlqIlYwoBPInCuYz5em7BgDGYbn58EYBTgqL0BqpHEpv 489fC3TZQWC0RWPR4GfK5PMfisxKMdACHIQfIYkdwXU0Jt2BGRpH0fcS6cTYi+g2nv95 IfAoK+s8TQ0X2OjIKJfLO0PwK3byQ+7oJzLqjlQCdDDg9ZEnrRPTSj9pdhSnflb2qGSe eEGg== 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=/5TakueqD+KxHE4Hr51rivXI8uOx3hQwzKqema/dw5Y=; b=QB5IHE7y61UkMJKJAZFr0eSEyivfhpp/5UJlXBTxX9mAcwYCrKK77F5dK2J+unwdAR iCjaIPnQGvhJN3jbvjqdGnI1OxudeMXfwFQ9gjbwwwBvuZITeu83W6lSM7j06tVKsvtL E1VCPkee6rOPtsc4AXV1ODNRokXuGFrdMa35471QjXj4AnTlBlTGCRQucXKkplowCEvg Np9+5Ua91vGExoovpRB7xtXgBrACT5LSvtMiyb56FtbFvFOXArTUMDNvVn+3JCAZZ7G6 7TCdZ5WVrokKXoAQdzX33juwrD6vXEE8uSuhOz2YlfSrvWv/X2Wapek0+7i3DeX0rZdv NGhA== 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 lj21si962014ejb.73.2020.05.25.07.22.37; Mon, 25 May 2020 07:23:00 -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 S2390955AbgEYOSS (ORCPT + 99 others); Mon, 25 May 2020 10:18:18 -0400 Received: from mga04.intel.com ([192.55.52.120]:33005 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388714AbgEYOSS (ORCPT ); Mon, 25 May 2020 10:18:18 -0400 IronPort-SDR: 9kp7l0/1emJTFCCPnoKx0KxazPR0UTzH+ZWA1sNleCCFnzXWWBzJUEU80X6j9oO4VYblxoUUZW 2r9rn0eHpb3Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2020 07:18:17 -0700 IronPort-SDR: PKwa7hdP8nhfjwrEaBTbkaN6IUMrskWubvB+npKhli0a/j7hsLqQjFtAXRDHo4OOUMTCAK0z31 yXbr3xoodNoA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,433,1583222400"; d="scan'208";a="301433081" Received: from linux.intel.com ([10.54.29.200]) by fmsmga002.fm.intel.com with ESMTP; 25 May 2020 07:18:17 -0700 Received: from [10.249.227.191] (abudanko-mobl.ccr.corp.intel.com [10.249.227.191]) by linux.intel.com (Postfix) with ESMTP id AA7BA580101; Mon, 25 May 2020 07:18:15 -0700 (PDT) Subject: [PATCH v4 02/10] 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: <653fe5f3-c986-a841-1ed8-0a7d2fa24c00@linux.intel.com> Organization: Intel Corp. Message-ID: <4bb72e44-5085-8e8a-e78e-c2d6e06e0796@linux.intel.com> Date: Mon, 25 May 2020 17:18:14 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <653fe5f3-c986-a841-1ed8-0a7d2fa24c00@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 2a9de6491700..0872b0b04a42 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