summaryrefslogtreecommitdiff
path: root/scripts/trace.pl
AgeCommit message (Collapse)Author
2018-01-08scripts/trace.pl: Optimize event parsing and processingTvrtko Ursulin
A couple of small optimizations which altogether bring around 30% improvement in my testing. 1. Do less string processing on tracepoints names and push more of the check into the if-ladder. 2. Pull out common db key and ctx processing and cache common values in local vars. 3. Key value pair parsing is faster with a regexp. 4. Avoid sorting the db hash multiple times if possible. v2: * Use faster key-value splitting method. (John Harrison) v3: * Fix floating-point to int time conversion. v4: * Fix refactoring and logic fails. (John Harrison) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: John Harrison <John.C.Harrison@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
2017-12-21scripts/trace.pl: Fix context id recyclingTvrtko Ursulin
Last refactoring introduced a copy and paste error, fix it. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reported-by: John Harrison <John.C.Harrison@intel.com> Cc: John Harrison <John.C.Harrison@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
2017-12-19scripts/trace.pl: Fix ring ignoreTvrtko Ursulin
Breakage from previous refactoring. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reported-by: John Harrison <John.C.Harrison@intel.com> Cc: John Harrison <John.C.Harrison@intel.com>
2017-12-19scripts/trace.pl: Remove some old codeTvrtko Ursulin
Remove some inactive code which was only uised to support the old execlists implementation. It is hidden behind a toggle which is not user accesible anyway. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: John Harrison <John.C.Harrison@intel.com>
2017-12-18scripts/trace.pl: Auto-detect tracepoint field orderTvrtko Ursulin
Instead of hard-coding the order of key-value pairs into regular expressions, auto-detect them as we go. At the same time re-factor the code so it is smaller and even slightly faster (10-15% by a quick measurement). Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: John Harrison <John.C.Harrison@intel.com> Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-06-09trace.pl: Handle multi-day uptimeTvrtko Ursulin
Handle multi-day uptime when parsing tracepoint timestamps. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-05-23trace.pl: Option to draw the aggreate GPU busy timelineTvrtko Ursulin
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-05-23trace.pl: Add aggregate GPU idle/busy statTvrtko Ursulin
Merge and flatten all the engine timelines to produce an aggregate stat. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-05-11igt/trace.pl: Collect perf data in quiet modeTvrtko Ursulin
We are not interested in knowing the amount of perf data captures so less noise is better. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-04-25igt/scripts: trace.pl to parse the i915 tracepointsTvrtko Ursulin
Given a log file created via perf with some interesting trace events enabled, this tool can generate the timeline graph of requests getting queued, their dependencies resolved, sent to the GPU for executing and finally completed. This can be useful when analyzing certain classes of performance issues. More help is available in the tool itself. The tool will also calculate some overall per engine statistics, like total time engine was idle and similar. v2: * Address missing git add. * Make html output optional (--html switch) and by default just output aggregated per engine stats to stdout. v3: * Added --trace option which invokes perf with the correct options automatically. * Added --avg-delay-stats which prints averages for things like waiting on ready, waiting on GPU and context save duration. * Fix warnings when no waits on an engine. * Correct help text. v4: * Add --squash-ctx-id to substract engine id from ctx id when parsing to make it easier to identify which context is which with new i915 ctx id allocation scheme. * Reconstruct request_out events where they are missing. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Harri Syrja <harri.syrja@intel.com> Cc: Krzysztof E Olinski <krzysztof.e.olinski@intel.com>