Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-18 Thread Alyssa Rosenzweig
> But on many other embedded OSes - at least Google ones like CrOS and > Android - the security model is way stricter. We could argue that is > bad / undesirable / too draconian but that is something that any of us > has the power to change. At some point each platform decides where it > wants

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-18 Thread Primiano Tucci
On 18/02/2021 20:26, Tamminen, Eero T wrote: Hi, (This isn't anymore that related to Mesa, but maybe it's still of interest.) On Thu, 2021-02-18 at 16:40 +0100, Primiano Tucci wrote: On 18/02/2021 14:35, Tamminen, Eero T wrote: [...] It doesn't require executable code to be writable from

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-18 Thread Tamminen, Eero T
Hi, (This isn't anymore that related to Mesa, but maybe it's still of interest.) On Thu, 2021-02-18 at 16:40 +0100, Primiano Tucci wrote: > On 18/02/2021 14:35, Tamminen, Eero T wrote: [...] > > It doesn't require executable code to be writable from user-space, > > library code can remain

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-18 Thread Rob Clark
On Thu, Feb 18, 2021 at 8:00 AM Rob Clark wrote: > > On Thu, Feb 18, 2021 at 5:35 AM Tamminen, Eero T > wrote: > > > > Hi, > > > > On Thu, 2021-02-18 at 12:17 +0100, Primiano Tucci wrote: > > [discussion about Perfetto itself] > > ... > > > eero.t.tamminen@ > > > from in common Linux distro

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-18 Thread Rob Clark
On Thu, Feb 18, 2021 at 7:40 AM Primiano Tucci wrote: > > > > On 18/02/2021 14:35, Tamminen, Eero T wrote: > > Hi, > > > > On Thu, 2021-02-18 at 12:17 +0100, Primiano Tucci wrote: > > [discussion about Perfetto itself] > > ... > >> eero.t.tamminen@ > >> from in common Linux distro repos. > >>

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-18 Thread Rob Clark
On Thu, Feb 18, 2021 at 5:35 AM Tamminen, Eero T wrote: > > Hi, > > On Thu, 2021-02-18 at 12:17 +0100, Primiano Tucci wrote: > [discussion about Perfetto itself] > ... > > eero.t.tamminen@ > > from in common Linux distro repos. > > > > That's right. I am aware of the problem. The plan is to

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-18 Thread Primiano Tucci
On 18/02/2021 14:35, Tamminen, Eero T wrote: Hi, On Thu, 2021-02-18 at 12:17 +0100, Primiano Tucci wrote: [discussion about Perfetto itself] ... eero.t.tamminen@ from in common Linux distro repos. That's right. I am aware of the problem. The plan is to address it with bit.ly/perfetto-debian

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-18 Thread Tamminen, Eero T
Hi, On Thu, 2021-02-18 at 12:17 +0100, Primiano Tucci wrote: [discussion about Perfetto itself] ... > eero.t.tamminen@ > from in common Linux distro repos. > > That's right. I am aware of the problem. The plan is to address it > with > bit.ly/perfetto-debian as a starter. Glad to hear

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-18 Thread Primiano Tucci
Hey folks, I'm one of the authors and maintainers of Perfetto, also +skyostil@. I am really sorry for the giant bulk reply. I'll try to do my best to answer the various open questions about Perfetto but I don't know a better way than some heavy -ing given I'm joining the party late. In

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-16 Thread Alyssa Rosenzweig
> That said, I'm ok with making perfetto support a build-time option > that is default disabled. And I think it would be even ok to limit > use of perfetto to individual drivers (ie. no core mesa/gallium > perfetto dependency) to start. And, well, CrOS has plenty of mesa > contributors so I

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-16 Thread Rob Clark
So, I did an experiment to get a feel for how hard/easy updating perfetto sdk would be.. I took gfx-pps (which already "vendors" the perfetto sdk) and rebuilt it with perfetto.cc/h from each existing perfetto release tag (v3.0 is the earliest I see, v12.1 is the latest). I did hack out the intel

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-16 Thread Jose Fonseca
-dev on behalf of Dylan Baker Sent: Saturday, February 13, 2021 02:15 To: Rob Clark Cc: ML mesa-dev Subject: Re: [Mesa-dev] Perfetto CPU/GPU tracing I can't speak for anyone else, but a giant pile of vendored code that you're expected to not update seems like a really bad idea to me. On Fri, Fe

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-15 Thread John Bates
I can vouch for the usefulness of the combined trace timeline showing CPU core usage, filtered application events and GPU usage. Android systrace shows this data -- I've used it from both an app developer perspective to fix countless performance bugs and from a whole-system perspective to tune

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-15 Thread Rob Clark
On Mon, Feb 15, 2021 at 3:13 AM Tamminen, Eero T wrote: > > Hi, > > On Fri, 2021-02-12 at 18:20 -0800, Rob Clark wrote: > > On Fri, Feb 12, 2021 at 5:56 PM Lionel Landwerlin > > wrote: > ... > > > In our implementation that precision (in particular when a drawcall > > > ends) comes at a stalling

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-15 Thread Tamminen, Eero T
Hi, On Fri, 2021-02-12 at 18:20 -0800, Rob Clark wrote: > On Fri, Feb 12, 2021 at 5:56 PM Lionel Landwerlin > wrote: ... > > In our implementation that precision (in particular when a drawcall > > ends) comes at a stalling cost unfortunately. > > yeah, stalling on our end too for per-draw

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-15 Thread Michel Dänzer
On 2021-02-13 3:15 a.m., Dylan Baker wrote: I can't speak for anyone else, but a giant pile of vendored code that you're expected to not update seems like a really bad idea to me. I agree. -- Earthling Michel Dänzer | https://redhat.com Libre software enthusiast

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-14 Thread Lionel Landwerlin
On 14/02/2021 00:47, Rob Clark wrote: On Sat, Feb 13, 2021 at 12:52 PM Lionel Landwerlin wrote: On 13/02/2021 18:52, Rob Clark wrote: On Sat, Feb 13, 2021 at 12:04 AM Lionel Landwerlin wrote: On 13/02/2021 04:20, Rob Clark wrote: On Fri, Feb 12, 2021 at 5:56 PM Lionel Landwerlin wrote:

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-13 Thread Rob Clark
On Sat, Feb 13, 2021 at 12:52 PM Lionel Landwerlin wrote: > > On 13/02/2021 18:52, Rob Clark wrote: > > On Sat, Feb 13, 2021 at 12:04 AM Lionel Landwerlin > > wrote: > >> On 13/02/2021 04:20, Rob Clark wrote: > >>> On Fri, Feb 12, 2021 at 5:56 PM Lionel Landwerlin > >>> wrote: > On

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-13 Thread Lionel Landwerlin
On 13/02/2021 18:52, Rob Clark wrote: On Sat, Feb 13, 2021 at 12:04 AM Lionel Landwerlin wrote: On 13/02/2021 04:20, Rob Clark wrote: On Fri, Feb 12, 2021 at 5:56 PM Lionel Landwerlin wrote: On 13/02/2021 03:38, Rob Clark wrote: On Fri, Feb 12, 2021 at 5:08 PM Lionel Landwerlin wrote:

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-13 Thread Rob Clark
On Sat, Feb 13, 2021 at 12:04 AM Lionel Landwerlin wrote: > > On 13/02/2021 04:20, Rob Clark wrote: > > On Fri, Feb 12, 2021 at 5:56 PM Lionel Landwerlin > > wrote: > >> On 13/02/2021 03:38, Rob Clark wrote: > >>> On Fri, Feb 12, 2021 at 5:08 PM Lionel Landwerlin > >>> wrote: > We're kind

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-13 Thread Lionel Landwerlin
On 13/02/2021 04:20, Rob Clark wrote: On Fri, Feb 12, 2021 at 5:56 PM Lionel Landwerlin wrote: On 13/02/2021 03:38, Rob Clark wrote: On Fri, Feb 12, 2021 at 5:08 PM Lionel Landwerlin wrote: We're kind of in the same boat for Intel. Access to GPU perf counters is exclusive to a single

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Dylan Baker
We're open source, tilting at windmills is what we do :D On Fri, Feb 12, 2021, at 18:49, Rob Clark wrote: > A lot of code, which like I said is mostly just generated ser/deser > and not very interesting.. and 90% of it we won't use (unless mesa > becomes a wifi driver, and more or less the rest

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Rob Clark
A lot of code, which like I said is mostly just generated ser/deser and not very interesting.. and 90% of it we won't use (unless mesa becomes a wifi driver, and more or less the rest of an OS). And if there is a need to update it, we update it.. it's two files. But *if* there are any API

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Rob Clark
On Fri, Feb 12, 2021 at 5:56 PM Lionel Landwerlin wrote: > > On 13/02/2021 03:38, Rob Clark wrote: > > On Fri, Feb 12, 2021 at 5:08 PM Lionel Landwerlin > > wrote: > >> We're kind of in the same boat for Intel. > >> > >> Access to GPU perf counters is exclusive to a single process if you want >

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Dylan Baker
I can't speak for anyone else, but a giant pile of vendored code that you're expected to not update seems like a really bad idea to me. On Fri, Feb 12, 2021, at 18:09, Rob Clark wrote: > I'm not really sure that is a fair statement.. the work scales > according to the API change (which I'm not

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Rob Clark
I'm not really sure that is a fair statement.. the work scales according to the API change (which I'm not really sure if it changes much other than adding things).. if the API doesn't change, it is not really any effort to update two files in mesa git. As far as bug fixes.. it is a lot of code,

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Rob Clark
On Fri, Feb 12, 2021 at 5:40 PM John Bates wrote: > > > > On Fri, Feb 12, 2021 at 4:34 PM Rob Clark wrote: >> >> On Thu, Feb 11, 2021 at 5:40 PM John Bates wrote: >> > >> >> >> >> > Runtime Characteristics >> > >> > ~500KB additional binary size. Even with using only the basic features of >>

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Lionel Landwerlin
On 13/02/2021 03:38, Rob Clark wrote: On Fri, Feb 12, 2021 at 5:08 PM Lionel Landwerlin wrote: We're kind of in the same boat for Intel. Access to GPU perf counters is exclusive to a single process if you want to build a timeline of the work (because preemption etc...). ugg, does that mean

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Dylan Baker
So, we're vendoring something that we know getting bug fixes for will be an enormous pile of work? That sounds like a really bad idea. On Fri, Feb 12, 2021, at 17:51, Rob Clark wrote: > On Fri, Feb 12, 2021 at 5:35 PM Dylan Baker wrote: > > > > > > > > On Fri, Feb 12, 2021, at 16:36, Rob Clark

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Rob Clark
On Fri, Feb 12, 2021 at 5:35 PM Dylan Baker wrote: > > > > On Fri, Feb 12, 2021, at 16:36, Rob Clark wrote: > > On Thu, Feb 11, 2021 at 5:40 PM John Bates wrote: > > > > > > > > > > > > Runtime Characteristics > > > > > > ~500KB additional binary size. Even with using only the basic features of

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread John Bates
On Fri, Feb 12, 2021 at 4:34 PM Rob Clark wrote: > On Thu, Feb 11, 2021 at 5:40 PM John Bates wrote: > > > > > > > Runtime Characteristics > > > > ~500KB additional binary size. Even with using only the basic features > of perfetto, it will increase the binary size of mesa by about 500KB. > >

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Dylan Baker
On Fri, Feb 12, 2021, at 16:36, Rob Clark wrote: > On Thu, Feb 11, 2021 at 5:40 PM John Bates wrote: > > > > > > > Runtime Characteristics > > > > ~500KB additional binary size. Even with using only the basic features of > > perfetto, it will increase the binary size of mesa by about

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Rob Clark
On Fri, Feb 12, 2021 at 5:08 PM Lionel Landwerlin wrote: > > We're kind of in the same boat for Intel. > > Access to GPU perf counters is exclusive to a single process if you want > to build a timeline of the work (because preemption etc...). ugg, does that mean extensions like

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Lionel Landwerlin
We're kind of in the same boat for Intel. Access to GPU perf counters is exclusive to a single process if you want to build a timeline of the work (because preemption etc...). The best information we could add from mesa would a timestamp of when a particular drawcall started. But that's

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Rob Clark
On Fri, Feb 12, 2021 at 4:51 PM Mark Janes wrote: > > Rob Clark writes: > > > On Fri, Feb 12, 2021 at 5:01 AM Tamminen, Eero T > > wrote: > >> > >> Hi, > >> > >> On Thu, 2021-02-11 at 17:39 -0800, John Bates wrote: > >> > I recently opened issue 4262 > >> >

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Mark Janes
Rob Clark writes: > On Fri, Feb 12, 2021 at 5:01 AM Tamminen, Eero T > wrote: >> >> Hi, >> >> On Thu, 2021-02-11 at 17:39 -0800, John Bates wrote: >> > I recently opened issue 4262 >> > to begin the >> > discussion on integrating perfetto

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Rob Clark
On Thu, Feb 11, 2021 at 5:40 PM John Bates wrote: > > Runtime Characteristics > > ~500KB additional binary size. Even with using only the basic features of > perfetto, it will increase the binary size of mesa by about 500KB. IMHO, that size is negligible.. looking at freedreno, a mesa build

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Rob Clark
On Fri, Feb 12, 2021 at 5:01 AM Tamminen, Eero T wrote: > > Hi, > > On Thu, 2021-02-11 at 17:39 -0800, John Bates wrote: > > I recently opened issue 4262 > > to begin the > > discussion on integrating perfetto into mesa. > > > >

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Rob Clark
yes, but that is a limitation of mali which does not apply to a lot of other drivers ;-) But AFAIU typically you'd use perfetto with a sort of system server collecting trace data from various different processes, so the fact that that mali trace perf counters come from somewhere else doesn't

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Alyssa Rosenzweig
Sure, I definitely see the use case for virgl :) On Fri, Feb 12, 2021 at 02:43:25PM -0800, Chia-I Wu wrote: > For virgl, where the biggest perf gaps often come from unnecessary CPU > waits or high latencies of fence signaling, being able to insert > userspace driver trace events and combine them

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Chia-I Wu
For virgl, where the biggest perf gaps often come from unnecessary CPU waits or high latencies of fence signaling, being able to insert userspace driver trace events and combine them with kernel ftrace events are a big plus. Admittedly, there is no HW counters and my needs are simpler (inserting

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Alyssa Rosenzweig
My 2c for Mali/Panfrost -- For us, capturing GPU perf counters is orthogonal to rendering. It's expected (e.g. with Arm's tools) to do this from a separate process. Neither Mesa nor the DDK should require custom instrumentation for the low-level data. Fahien's gfx-pps handles this correctly for

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread John Bates
(responding from correct address this time) On Fri, Feb 12, 2021 at 12:03 PM Mark Janes wrote: > I've recently been using GPUVis to look at trace events. On Intel > platforms, GPUVis incorporates ftrace events from the i915 driver, > performance metrics from igt-gpu-tools, and userspace ftrace

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Mark Janes
I've recently been using GPUVis to look at trace events. On Intel platforms, GPUVis incorporates ftrace events from the i915 driver, performance metrics from igt-gpu-tools, and userspace ftrace markers that I locally hack up in Mesa. It is very easy to compile the GPUVis UI. Userspace

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread John Bates
On Fri, Feb 12, 2021 at 5:01 AM Tamminen, Eero T wrote: > > Unlike some other Linux tracing solutions, Perfetto appears to be for > Android / Chrome(OS?), and not available from in common Linux distro > repos. > > So, why Perfetto instead of one of the other solutions, e.g. from ones > mentioned

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Tamminen, Eero T
Hi, On Thu, 2021-02-11 at 17:39 -0800, John Bates wrote: > I recently opened issue 4262 > to begin the > discussion on integrating perfetto into mesa. > > *Background* > > System-wide tracing is an invaluable tool for developers to find

[Mesa-dev] Perfetto CPU/GPU tracing

2021-02-11 Thread John Bates
I recently opened issue 4262 to begin the discussion on integrating perfetto into mesa. *Background* System-wide tracing is an invaluable tool for developers to find and fix performance problems. The perfetto project enables a combined