Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp739851ybg; Mon, 1 Jun 2020 13:08:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyomC0zUvddyCeivt2fzuWp95op0tGZYYCgigoV8oqzV6hayRRYdQk98JBDkXVivq/KnFW7 X-Received: by 2002:a17:906:f6d6:: with SMTP id jo22mr20066162ejb.310.1591042135972; Mon, 01 Jun 2020 13:08:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591042135; cv=none; d=google.com; s=arc-20160816; b=JYmk/XxzJNXXGUAGgwVYXDGbSoSX9DGX6YUtn3Nq/lIJeABJfT+HLJrASxkFp/95nN DOpObcnPArwB2tB28AO1pUA0Q/5PD6mDMQ+s9tKOM+TlJCu8usRrjVpId1hq5n76RZqP VDVPzf9s6Z1uJN1YLEAYi60scJkBRR9/UgI2YkW4hg7mBHNd2ka8F65CQkyyP6gzaztx AACZhu+9LVi0CgJNjtV/qh2CK27v/llA1FhEW8QhnMI3S8ka/LFO7NSxb32KkGlIhlFB doIwt2HnnClm9/XHTzSykkp8+PwEyJS77Bx0tdx966uyVJr9fDMDcYWprkwVzP+tl0be CQcQ== 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=jy8s1wOOGQ3A3RRwom2gC4/R4QbOZCyDVeSNX1q2/CwexSEbpck3S7Dj5EciOVudfB iYnaN/3wiTfrqAuPgxTP7lff301zHXsIKUloAvpuPFGtq+KWXZLha6BAZnXSwqZOE66c mYfBDWadLn1kUQBpsf+mYBKiJcPRbdaP10C5NcsltXtNB20xz3u/2OYjGJyT9rLZgf4v oZVc5l0bg4xEfTc0kGPAnGOuEFDW2NvN05swdtWKatcLodwT5Fv9sqqIaKo78BoMRgPP rIhtgAwsOkN5+jhe6cY6lYlnOemQErbYE/bG9n4DaN/VNzKkpNU3SsjBaV8zaDLQjxNX 5ZZg== 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 bc22si237681edb.368.2020.06.01.13.08.32; Mon, 01 Jun 2020 13:08:55 -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 S1728381AbgFAUGV (ORCPT + 99 others); Mon, 1 Jun 2020 16:06:21 -0400 Received: from mga11.intel.com ([192.55.52.93]:5305 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726201AbgFAUGV (ORCPT ); Mon, 1 Jun 2020 16:06:21 -0400 IronPort-SDR: HbtJLL8rOVtYh3WTNWCMyFnwUVtwIbVB785RsX7b7c4U83Jnh5m/+M4NLcouwATYA829ZJ0TU7 W0oobiARMIgw== 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; 01 Jun 2020 13:06:20 -0700 IronPort-SDR: dU2KstJKiWckHlgRMEznYHQwzt1qcVa0Q6k8uZgxgupp5YTGQX/HEQ2suuDoFbMkYY263Z8D57 +/OKF3K/fuzg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,462,1583222400"; d="scan'208";a="303995052" Received: from linux.intel.com ([10.54.29.200]) by orsmga008.jf.intel.com with ESMTP; 01 Jun 2020 13:06:20 -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 5CC7258010E; Mon, 1 Jun 2020 13:06:18 -0700 (PDT) Subject: [PATCH v6 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: <9ecf0d64-be37-23ce-442b-a548e29f04c9@linux.intel.com> Date: Mon, 1 Jun 2020 23:06:17 +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