Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3954974pxu; Mon, 12 Oct 2020 05:59:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwO6uuzlRxjpiAnoAHxcdVEWnQFvS8H7tETovFu/Z7ThDo/JaDM9ODhspUKc85ZImF2/NH X-Received: by 2002:a17:906:564d:: with SMTP id v13mr29265584ejr.217.1602507572190; Mon, 12 Oct 2020 05:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602507572; cv=none; d=google.com; s=arc-20160816; b=OGxjj/YGMruiMdsnH0HleUX9yd1IkS8j4WiDFzsnBdKn4vcyjVKfL8P31bEZ8tbaq9 NYlSkgFfcIfInFIZNoUY0VQnPR6vhCgV3wN38H6/8qpnJIoM30f+TsDyj+nrsy/JEnxt 55nMAtljcQgwyCX6rAgLaO9l3W4iczsYfYhLSFfOk7wUea8jSGKWuqiXbCuf3RssjBGS f1BeNNJ6SFpNQ4f1Zmpy774qtJ3zag5HVA7+7hM5vUQqE07Fj8vaRIZCVw/b7xm41P/C RkR+jMg54U7vHjeT05Rv4m3XKWnEZ8PT/P56FHwWBseafh8S6hwGVrxfBk2x2cDVzIUk kDig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=z2Y/Lb9nPuk1kme92NA1fswREj0I4IzPAu8oWl8G0kI=; b=Y0Ox1rzn9fVLQrSdz+7LH9ciN+Q4sXPLjzIr0V3druVKgnFkUbLAB5QMhEPdnxpJrv nqmEbOQYqE0Io1yaSx/i+U49LrVOhQgOBRFT82LJepimxZw1MfY8Mji/ZPgQLUtBj1R2 T/ogr1Mr8w9ZBXZG/LeL2+ITm5G1h3JASd7zEm3xd/OazUoc2e8IV+l8NHaxEZjaH43s 9DaWWJPUSLycHQlEn5yCFnHO4UDsTInI/QKWjhkNxmSbepIFr1qD8Y84HrzCCHjQRDLz y0JPG9LwPC3b3cwotoVUZbTiTIoNoEmdlOCspMeGDsCVH3It2wYvtXAAIUOs1Pn5kBSL yLdw== 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 x23si11992021eju.401.2020.10.12.05.59.09; Mon, 12 Oct 2020 05:59:32 -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 S1728885AbgJLJCo (ORCPT + 99 others); Mon, 12 Oct 2020 05:02:44 -0400 Received: from mga17.intel.com ([192.55.52.151]:1953 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727121AbgJLJCo (ORCPT ); Mon, 12 Oct 2020 05:02:44 -0400 IronPort-SDR: faYTSfPYgJr4AFeCBwGD9QHm0XBhYr9O9Ag9iwKRikpiPF0vl5NZ91BlIV/mQzOxuLGbvHXqjW jUNv869aoy0g== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="145574962" X-IronPort-AV: E=Sophos;i="5.77,366,1596524400"; d="scan'208";a="145574962" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 02:02:43 -0700 IronPort-SDR: ygvizUtS/A6xdWDQtk2NJtEpvEbBC4fjcPAeYRG/MuyPCRytZFaruzWfwUYyj6Vi7/5NASzSEJ ftQ4CuCHxbjA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,366,1596524400"; d="scan'208";a="344804594" Received: from linux.intel.com ([10.54.29.200]) by fmsmga004.fm.intel.com with ESMTP; 12 Oct 2020 02:02:41 -0700 Received: from [10.249.225.186] (abudanko-mobl.ccr.corp.intel.com [10.249.225.186]) by linux.intel.com (Postfix) with ESMTP id CA5F35805EC; Mon, 12 Oct 2020 02:02:38 -0700 (PDT) Subject: [PATCH v1 09/15] perf record: introduce thread specific objects for trace streaming To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Namhyung Kim , Alexander Shishkin , Andi Kleen , Adrian Hunter , Peter Zijlstra , Ingo Molnar , linux-kernel References: <810f3a69-0004-9dff-a911-b7ff97220ae0@linux.intel.com> From: Alexey Budankov Organization: Intel Corp. Message-ID: Date: Mon, 12 Oct 2020 12:02:37 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <810f3a69-0004-9dff-a911-b7ff97220ae0@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce thread local data object and its array to be used for threaded trace streaming. Signed-off-by: Alexey Budankov --- tools/perf/builtin-record.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index ba26d75c51d6..8e512096a060 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -85,11 +85,29 @@ struct switch_output { int cur_file; }; +struct thread_data { + pid_t tid; + struct { + int msg[2]; + int ack[2]; + } comm; + struct fdarray pollfd; + int ctlfd_pos; + struct mmap *maps; + int nr_mmaps; + struct record *rec; + unsigned long long samples; + unsigned long waking; + u64 bytes_written; +}; + struct record { struct perf_tool tool; struct record_opts opts; u64 bytes_written; struct perf_data data; + struct thread_data *thread_data; + int nr_thread_data; struct auxtrace_record *itr; struct evlist *evlist; struct perf_session *session; -- 2.24.1