Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp605361ybg; Wed, 3 Jun 2020 08:56:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjflVpOZvye1E9z2xkz+cReFgqsGk9VSOIo+zZE9u0+73QXPeK3ucZBP8fcZQTHefrpw5Z X-Received: by 2002:aa7:d359:: with SMTP id m25mr43033edr.365.1591199791421; Wed, 03 Jun 2020 08:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591199791; cv=none; d=google.com; s=arc-20160816; b=JSp6LO2kAN2SD2tI39tkpYI1Lx/Fplq1GsdPq8bnFLBXndAk1knT7wduMSNsMIFmUu 8g5hom6OrsyQSfhJFP/ZibWqhD2eSUJ6kZEV8dWHl45JWKX5UF9+1mjDv2f1SxuecA3H IcGuHh75HP9R+r9St+QY6aY1t+1hCe4D6Nub6ogVAwygKpfOodoTwo5ZpBUCq6LBFpii sMh9tteFxIikqadHDHq2638bd2VCdq+fdMf9VEtu2MtZ1uppYJT53+6RaPXOW1VFCX7V ZCr8J1Ib2XQmjcrDK6g+/8ctibRXxHMBVVDGkcGT1PjitGo7ZUjgol4xUirzxhDqgrju aXzg== 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=t+pYMAKpUeIThp50Igh6Pd6nvUX4L7swuvy54lkGOOi52LkxEMRd9h8WDusET++OKd YG6kRvIezhnLMRSRlx+mqD5O1WvUgaNOz0V05tLyv5+ty49wIEGKXyiI2JtX6Cv/zgAT bPMPe43v7u3lutWBPQy56uJ75ymLUqwMk0/DSil/IOL5tq/Du7+yA3f6SPiRaVuZEP4/ OgrxUBeP0MyiSLQCTozs/59GSpl+ItthhTQK3oiEhCIFDh/hKikywHFbkGSCTsTREbZp p6BZMpCuH99qwTBerlGQqeW99xgQrGySIjQg04MsxImX1KJD04X4RkeZUd0e8rMC1XTN M6lA== 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 w13si1293884ejb.233.2020.06.03.08.56.07; Wed, 03 Jun 2020 08:56:31 -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 S1726123AbgFCPxu (ORCPT + 99 others); Wed, 3 Jun 2020 11:53:50 -0400 Received: from mga18.intel.com ([134.134.136.126]:58410 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbgFCPxt (ORCPT ); Wed, 3 Jun 2020 11:53:49 -0400 IronPort-SDR: Fgb9nOKM2kCY7AGhJTXMzEUSqFVULNmZPJtbFIbHD3Q94u2fqG2VaB4wjP+DgDjLNrBpfB9+Rm WxauYq4rlWCg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2020 08:53:49 -0700 IronPort-SDR: i1/WrGilAdo5GBqYVDsVW23Jhg5Ftw10sg0B8gDfanRtLfuN97xoC3pyR4xK2LyQRruAldlAYx xl0ef8ev1UPQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,468,1583222400"; d="scan'208";a="445157045" Received: from linux.intel.com ([10.54.29.200]) by orsmga005.jf.intel.com with ESMTP; 03 Jun 2020 08:53:48 -0700 Received: from [10.249.225.188] (abudanko-mobl.ccr.corp.intel.com [10.249.225.188]) by linux.intel.com (Postfix) with ESMTP id 9CCDE5800E3; Wed, 3 Jun 2020 08:53:46 -0700 (PDT) Subject: [PATCH v7 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: <5de4b954-24f0-1e8d-5a0d-7b12783b8218@linux.intel.com> Organization: Intel Corp. Message-ID: Date: Wed, 3 Jun 2020 18:53:44 +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: <5de4b954-24f0-1e8d-5a0d-7b12783b8218@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