From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4855E89AAD for ; Tue, 24 Aug 2021 03:50:39 +0000 (UTC) Date: Mon, 23 Aug 2021 20:50:38 -0700 Message-ID: <877dgb1oxd.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210803200737.30843-4-umesh.nerlige.ramappa@intel.com> References: <20210803200737.30843-1-umesh.nerlige.ramappa@intel.com> <20210803200737.30843-4-umesh.nerlige.ramappa@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH 4/5] tools/i915-perf: Add mmapped OA buffer support to i915-perf-recorder List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Umesh Nerlige Ramappa Cc: igt-dev@lists.freedesktop.org, Lionel G Landwerlin List-ID: On Tue, 03 Aug 2021 13:07:36 -0700, Umesh Nerlige Ramappa wrote: > > Currently report from OA buffer are read from the perf_fd. The kernel > patches enable mmaping the OA buffer into user space to allow for faster > report queries across different platforms and engines. > > Enable OA buffer to be mmaped by the recorder tool based on command line > option -M. > > Example: > i915-perf-recorder -m RenderBasic -s 8000 -k "mono" -M > > The recorder processes the mmaped OA buffer by periodically reading the > OA TAIL PTR register from a batch and determining the number of reports > available. These reports are then logged in the circular-buffer as > INTEL_PERF_RECORD_TYPE_MULTIPLE_SAMPLE records. In this implementation > the periodicity of checking the TAIL is the same as writing correlation > timestamps (1 sec). I haven't looked at everything so correct me if I am wrong but I have this other concern about INTEL_PERF_RECORD_TYPE_MULTIPLE_SAMPLE. What is the reason for introducing this? I would have thought that whether OA data has been collected using read's or mmap is a property only of the recorder and should not be exposed to the reader or gpuvis. So in the mmap case the recorder should basically do what the kernel does but not introduce a new perf record type. But now we are seeing changes both in the reader and gpuvis because we have introduced INTEL_PERF_RECORD_TYPE_MULTIPLE_SAMPLE? Thanks.