Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp321003ybt; Wed, 17 Jun 2020 01:38:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzO5c7BMFVxfh/HbOrNvSz0d20O/yzSbvxpg8HM6xf5o2G9cHk3pB8DpbGS7Evnz12rvlkK X-Received: by 2002:a17:906:e115:: with SMTP id gj21mr6257717ejb.528.1592383085177; Wed, 17 Jun 2020 01:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592383085; cv=none; d=google.com; s=arc-20160816; b=dgrk8uGf1tpx8WjdV9tUf5XEGv6J6dOrLeh9zu7zoXjRsJUOhBkReTtLpARndQEYGx SbsXz0FLvf5N9iJ2Gc5nH5nR6oesQ5yIG3HLTzprs69yjALKJrR48iZu4aAJVVrtNhr+ Q4/CB2rJOveXSflCXKDRNyYAQIyzuWhwgdZVvokPNb0EKvuKFswvtpVclm92QZDxVnRB xB6rxTeXgCygHT5AYgTwe6mNFLEjWAmubvZu3NZDgJxn7mOcglIwTpB8lxMeZrnLC+q1 pPRzcBcLRrgD38Vw0zkVP2no16FX5IOllFwAIxaBKbI77Ur6TraMfm6QOIU3zDGw2sbh VyBg== 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=uaaBzzWNgs2wBAoI3Kr3qsWuCZhbnh2j8dtkNhIrIJEXprmmNp260b9U4SrENsOTfI jmxYvq54Le586Z5qzAVO4mghoMWvCS+b3ansni1HMXXIuFBIWvylyFUT4+dNeHK+DyOc LBpG78myxCYw+phVX2Y3PK4pM2f6OCmC/lO2bezn8HjAdlAV5P0/YSInihx+/jIJrIqv KAqsaqVcsXNOy2CDo+SY0GYx05zrDr2kgd6r6NQEVg/P+znfgDCvxNQn7j4lb/dMU9QY 5BHcJK5WCl/b8s9rtGXWEvn768BVmUpLxyj27dHYwnhGkFQUkgTXaGEQ4kxZ3letwQS1 nWyA== 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 bi8si5319562edb.602.2020.06.17.01.37.43; Wed, 17 Jun 2020 01:38:05 -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 S1726919AbgFQIgA (ORCPT + 99 others); Wed, 17 Jun 2020 04:36:00 -0400 Received: from mga07.intel.com ([134.134.136.100]:63091 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726597AbgFQIf7 (ORCPT ); Wed, 17 Jun 2020 04:35:59 -0400 IronPort-SDR: wvAFN5sBIsAwAl6L5a+N8/ncoA6xRxgalvLYO+tYNT5UpqQLiN3xrNPb9btoW5ALCSQVD0miHG 2Hxq0+uK3K7w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2020 01:35:59 -0700 IronPort-SDR: deQhRjmievtl0RqStPgVonY+EKsvjhupga4WH4QQ19JkARV1hxlWp4+2x/WQOG5aYs01SEdkFe 0CDXTRslhRGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,522,1583222400"; d="scan'208";a="291359616" Received: from linux.intel.com ([10.54.29.200]) by orsmga002.jf.intel.com with ESMTP; 17 Jun 2020 01:35:59 -0700 Received: from [10.249.225.191] (abudanko-mobl.ccr.corp.intel.com [10.249.225.191]) by linux.intel.com (Postfix) with ESMTP id 53333580223; Wed, 17 Jun 2020 01:35:57 -0700 (PDT) Subject: [PATCH v8 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: <0781a077-aa82-5b4a-273e-c17372a72b93@linux.intel.com> Organization: Intel Corp. Message-ID: Date: Wed, 17 Jun 2020 11:35:56 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <0781a077-aa82-5b4a-273e-c17372a72b93@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 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