How to interpret Profile Results

José Fonseca jose.r.fonseca at gmail.com
Tue Nov 17 03:24:20 PST 2015


On Fri, Oct 30, 2015 at 4:16 PM, Rafael Spring <rafael at dotproduct3d.com>
wrote:

> Hello,
>
> we are currently doing some performance testing of our GPU code and have
> found that apitrace (a tool we really appreciate!) contains a profiling
> tool that works with OpenGL.
>
> However we are a bit unsure how to interpret the results. According to the
> Profile Results a lot of GPU time seems to be spent in draw calls of a few
> simple shaders that don't draw a lot of pixels, whereas the complex shaders
> that draw lots of pixels seem to be fairly quick. Also some of the GPU draw
> call times seem to vary by orders of magnitude for the same shader and
> operation (i.e. one call takes ~20 us and the next draw call, performing
> the exact same operation with the same shader but possibly to a different
> part of the framebuffer, takes 10000 us).
> We suspect the execution times aren't always true compute times but may
> contain stall times. Another theory is that some of the draw call times are
> actually just scheduling times and the real computation time ends up
> counting towards another draw call timing, when a batch of operations gets
> executed.
>

It's possible.

D3D11 has D3D11_QUERY_TIMESTAMP_DISJOINT to detect when timestamps are not
reliable.  OpenGL has no such thing.

Still, we use GL_TIME_ELAPSED for durations (not deltas of GL_TIMESTAMP's),
and we emit one query for every draw call, so even if something happened,
the OpenGL implementation should be giving reliable results, as the
BeginQuery/Draw/EndQuery should all stay together.

If this was a discrete GPU, it would be possible that the variation was due
swaping things in/out of the on-chip memory, but given this is an
integrated GPU that shouldn't happen.


> Any insight into how to interpret the Profile Results and how to derive
> optimization insight from it would be greatly appreciated.
>
> For testing we are currently using a MS Surface Pro 3 tablet running
> Windows 8.1.
>
> Thanks,
> Rafael
>

I'm afraid I don't much advice.

Maybe with these tools you can figure out if any abnormal event is causing
the variation you see:

- gpuview

  https://graphics.stanford.edu/~mdfisher/GPUView.html

http://make-aitee-work.blogspot.co.uk/2014/01/diagnose-opengl-performance-problems.html

https://developer.nvidia.com/content/are-you-running-out-video-memory-detecting-video-memory-overcommitment-using-gpuview

- https://software.intel.com/en-us/gpa

Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20151117/c146e3bd/attachment.html>


More information about the apitrace mailing list