From: James Benton Date: Mon, 6 Aug 2012 17:04:56 +0000 (+0100) Subject: Updated README with help for using new profiling options. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=5b670de5bcc9fa64b16bde462c0aa38ca03999c8;p=apitrace Updated README with help for using new profiling options. --- diff --git a/README.markdown b/README.markdown index 9702ba0..cdd5dd8 100644 --- a/README.markdown +++ b/README.markdown @@ -312,8 +312,8 @@ You can make a video of the output by doing | ffmpeg -r 30 -f image2pipe -vcodec ppm -i pipe: -vcodec mpeg4 -y output.mp4 -Triming a trace ---------------- +Trimming a trace +---------------- You can make a smaller trace by doing: @@ -324,6 +324,26 @@ individual call numbers a plaintext file, as described in the 'Call sets' section above. +Profiling a trace +----------------- + +You can perform gpu and cpu profiling with the command line options: + + * `-pgpu` record gpu times for frames and draw calls. + + * `-pcpu` record cpu times for frames and draw calls. + + * `-ppd` record pixels drawn for each draw call. + +The results from this can then be read by hand or analysed with a script. + +scripts/profileshader.py will read the profile results and format them into a +table which displays profiling results per shader. + +For example, to record all profiling data and utilise the per shader script: + ./glretrace -pgpu -pcpu -ppd foo.trace | ./scripts/profileshader.py + + Advanced usage for OpenGL implementors ======================================