Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1378636pxu; Sat, 24 Oct 2020 08:50:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzS8Eo9gRXPPtLNl3IW4zI43iWNTm+0wK1ALzEGjqK8/bXIWLGImUfK7LY80vb6/jfo8x4q X-Received: by 2002:a17:906:5e44:: with SMTP id b4mr7636316eju.211.1603554631120; Sat, 24 Oct 2020 08:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603554631; cv=none; d=google.com; s=arc-20160816; b=gFmX0dypaDbGm5ONu1vl8lExbgbKmXZIdaVGpkXK8Lm073OOx9x6dtDPm+nE9BltX6 +a+yGsIGPgdr+aG1ah2zgGourEv5wtQSmSB/UwCsE1PTuSyM9pUNbPpmsVmEwcjiezXU Gx3wErDtYYw0kQxzD7etl41mQ9gkz1Hs1FhTXqcCcSuEuOTlcR0KpWJ3Fh0wl//wInXX 4eEjUtX+7VfDGRECtIeCl/XHifeC+ZVlZ7yas8S3l1csxbf49zKDT3HFMxMS5wUgeLeC G4Kui36jZwv7jT713nhBgVdynRRjnGYyqD89FssdIb8u4O2uYmb3M88ADK0umj8N2xGj JYww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=32NgTVPVkV+hTa4Fp4UdRpCuBFT6chXDih3qL8r3EJ4=; b=InvAGNAHEmItzmaCRfdkDHQ2l+mV1JPJnwaZDQwYBGrzvl0aXTxacvfq18/ehVrQp3 Y4MQ9jvoebAuuRe4JtAnIWu79lvFB4dTxCKVCknmQeLzLV9Ceaq/AaPyddifijIomYrl XJQbYS9R0MnMNNR8AWde/58iY6YmiysEqAoRLZVtB6+IMaUPByLk13/Zca/rJysRUh9P /RHoKq1ge+yGfkoxa7HPJ8miPTWGGB2ckEMFVXTzyEd59RvdYsP14ufG+mfBegVQ9+2a U4Abeu5VAdS81e8fS9SNwBLKffLZUeit7Vdfl6rXAgrYZbB+zUdUMuKZVn3NaVvwJXVd 6cNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q9kswszB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s11si3061743eju.335.2020.10.24.08.50.09; Sat, 24 Oct 2020 08:50: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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q9kswszB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760047AbgJXPol (ORCPT + 99 others); Sat, 24 Oct 2020 11:44:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:32207 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761098AbgJXPol (ORCPT ); Sat, 24 Oct 2020 11:44:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603554280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=32NgTVPVkV+hTa4Fp4UdRpCuBFT6chXDih3qL8r3EJ4=; b=Q9kswszBQ2x+rSBjoF5zThz9IVuxSGp8ldfvbt9FeWnJkfksoHcoSQVj4ObvbsPyMpVg9O N9Awz7RInoX+pFOJ46GMvhKqXX9cjUt1l1EFG9SOBkhRo447rz38NoFMIlt5WVdseZfhv9 UtvSqt9qW61qB7Wp6JMi4glsGCz/S0Y= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-66-wxqpZYWnMPSSSnyVjilsJw-1; Sat, 24 Oct 2020 11:44:35 -0400 X-MC-Unique: wxqpZYWnMPSSSnyVjilsJw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4A1F51868404; Sat, 24 Oct 2020 15:44:34 +0000 (UTC) Received: from krava (unknown [10.40.192.80]) by smtp.corp.redhat.com (Postfix) with SMTP id 6389360C84; Sat, 24 Oct 2020 15:44:32 +0000 (UTC) Date: Sat, 24 Oct 2020 17:44:31 +0200 From: Jiri Olsa To: Alexey Budankov Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Adrian Hunter , Andi Kleen , Peter Zijlstra , Ingo Molnar , linux-kernel Subject: Re: [PATCH v2 09/15] perf record: introduce thread specific objects for trace streaming Message-ID: <20201024154431.GH2589351@krava> References: <1ec29ed6-0047-d22f-630b-a7f5ccee96b4@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 21, 2020 at 07:03:48PM +0300, Alexey Budankov wrote: > > 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; > +}; please merge the struct with the code that's using it jirka > + > 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 >