summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2022-06-15code_cov_parse_info: output filters at the html reportMauro Carvalho Chehab
Add a line after the code coverage summary printing the filters that were used to produce the results, if any. This is important specially when multiple filters could be used to produce different reports. Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-14code_cov_parse_info: add support for generating html reportsMauro Carvalho Chehab
While lcov has already its own report generator, it is interesting to be able to deal with multiple files exposing each input in separate. So, add new command line parameters to allow it to generate html reports. Also add some command lines to setup html title, add a css file and include a prolog/epilog at the html body. The title option can also be useful to rename the titles when merging multiple info files. Acked-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-14code_cov_parse_info: add support for exclude filtersMauro Carvalho Chehab
It is interesting to have support not only for including, but also for excluding functions and files. Also, it is trivial to have support for it. When either one or both source/function filters are enabled, it will print at the console the regular expressions that are applied to functions and sources (if any), e. g.: $ cat << END >f1 +i915 gem - display -selftest END $ cat << END >f2 -/selftests END $ code_cov_parse_info dg1.info dg2.info --func-filters f1 --source-filters f2 --stat lines......: 72.1% (176 of 244 lines) functions..: 77.3% (17 of 22 functions) branches...: 50.0% (68 of 136 branches) Filters......: function regex (not match: m`display` m`selftest` and match: m`i915` m`gem`), source regex (match: m`/selftest`) and ignored source files where none of its code ran. Source files.: 0.99% (7 of 710 total), 77.78% (7 of 9 filtered) Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-14code_cov_parse_info: fix --show-lines logicMauro Carvalho Chehab
print_code_coverage function needs to first read the number of lines and then simplify the $file by removing its prefix. Without that, it ends trying to access an uninitiated value, leading to warnings and not doing what's expected. While here, also check if the ln data is valid, just in case the .info file might have some FN field(s) missing. Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-14code_cov_parse_info: fix error handling when opening filesMauro Carvalho Chehab
While on bash scripts we use "||" for error handling, perl accepts it, but it has a higher priority, thus would require to use parenthesis before that. That causes it to print a warning when the open fail while reading filter files, instead of the original intent of finishing and reporting an error. So, let's use "or" instead. Reviewed-by: Ch Sai Gowtham <sai.gowtham.ch@intel.com> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-14scripts/code_cov_parse_info: better handle test nameMauro Carvalho Chehab
The TN field generated by standard lcov is weird: it keeps repeating the TN field from time to time. At genhtml, it seems that only the first one is used. As we're using TN to indicate the test name, preserve all different test names at the output file. Also, printing such names doesn't really makes sense when --print-used and --print-unused command line options are used, and printing a list of 100+ names won't make much sense. So, just remove printing the test names. Reviewed-by: Ch Sai Gowtham <sai.gowtham.ch@intel.com> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-14scripts/code_cov_selftest.sh: test if IGT code coverage is workingMauro Carvalho Chehab
The runner_tests.c won't be able to test code coverage, as it requires a kernel specially built for such purpose. So, add a script that will validate possible steps while doing code coverage. Reviewed-by: Ch Sai Gowtham <sai.gowtham.ch@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-14scripts/meson.build: install code coverage scriptsMauro Carvalho Chehab
Those scripts are needed at runtime. So, place them under bindir. Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-14scripts/code_cov_gen_report: add support for filtering info filesMauro Carvalho Chehab
Now that we have a script that allows filtering the results, add support for it when generating code coverage reports. Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-14scripts/code_cov_parse_info: add a tool to parse code coverage info filesMauro Carvalho Chehab
The code coverage info files provide useful information about what functions were called and how many times. It can also contain data that it is not useful for the code coverage, like calls to non-DRM related Kernel APIs. Add a tool that helps filtering out non-DRM files and prints what functions were called. Both the stats, prints and output files are affected by the filters: $ code_cov_parse_info --stat total.info lines......: 40.8% (71989 of 176442 lines) functions..: 50.2% (5975 of 11909 functions) branches...: 28.7% (35006 of 121893 branches) Source files: 744 $ code_cov_parse_info total.info --stat --only-drm lines......: 40.3% (70244 of 174170 lines) functions..: 50.8% (5835 of 11491 functions) branches...: 28.4% (33096 of 116707 branches) Ignored......: non-drm headers. Source files.: 78.36% (583 of 744 total) $ code_cov_parse_info total.info --stat --only-drm --ignore-unused -o o.info lines......: 47.9% (70244 of 146752 lines) functions..: 50.8% (5835 of 11491 functions) branches...: 32.8% (33096 of 100900 branches) Ignored......: non-drm headers and source files where none of its code ran. Source files.: 58.87% (438 of 744 total), 75.13% (438 of 583 filtered) $ code_cov_parse_info --stat o.info lines......: 47.9% (70244 of 146752 lines) functions..: 59.8% (5835 of 9763 functions) branches...: 32.8% (33096 of 100900 branches) Source files: 438 Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-14scripts/code_cov*: remove the extensions from themMauro Carvalho Chehab
As those scripts will be installed and executed from the PATH, remove the extensions from them, in order to make it more elegant when installed on distros. Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-21scripts:code_cov_gather_on_test: use a faster scriptTomi Sarvela
The original shell script takes too long to complete (~7-10 seconds), while the python version requires only ~500 ms. As this has a relevant impact when doing the tests, use the faster version. Signed-off-by: Tomi Sarvela <tomi.p.sarvela@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-21scripts/run-tests.sh: add code coverage supportMauro Carvalho Chehab
When the Kernel is built with GCOV_KERNEL and one or more drivers are built with GCOV_PROFILE enabled[1], the Kernel will collect code coverage usage at the same time as a test runs. Add support at run-tests.sh to collect usage data and store them on .info files. That actually require two new options: -c <test_name>: will store the tests under test_name.info; -k <kernel_tree>: Points to the source code of the built Kernel. The Kernel tree can be a partial tree, provided that it contains at least all *.h files used by the drivers, plus the *.c files that were built with gcov support enabled. [1] See https://01.org/linuxgraphics/gfx-docs/drm/dev-tools/gcov.html Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-21scripts/code_cov_gen_report.sh: add a script to generate code coverage reportsMauro Carvalho Chehab
The proper sequence to process the results at the build machine is not trivial. Add a script automating such steps. Reviewed-by: Tomi Sarvela <tomi.p.sarvela@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-21scripts/code_cov_capture.sh: add a script to use lcov on build+test machineMauro Carvalho Chehab
When the test machine is also the build machine, it is possible to run lcov directly on it. That makes the IGT tests faster, as it won't need to generate a results tarball, and the produced results will be independent on the Kernel object files, making the output files more portable. It should be noticed that, in order to generate html files, the Kernel source will still be needed, due to the detailed view. Reviewed-by: Tomi Sarvela <tomi.p.sarvela@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-21scripts/code_cov_gather_on_build.sh: Improve the scriptMauro Carvalho Chehab
- speedup the script by allowing Sparse file detection instead of libz compression; - use realpath for the paths to allow running them from everywhere; - Speedup tarball generation by limiting the source file scope to the DRM subsystem; - Indent with tabs instead of spaces. Reviewed-by: Tomi Sarvela <tomi.p.sarvela@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-21scripts/code_cov_gather*/sh: add help scripts for code coverageMauro Carvalho Chehab
When a Linux Kernel is built with gcov support, the compiler creates some other object files (*.gcno) that are dependent of the compiler version, and contain references to the source files. At Kernel runtime at the test machine, counter files will be visible at sysfs (*.gcda files), which are also on a compiler specific format. In order to be able to properly parse the contents of the counters, the information from 3 different places should be merged altogether: - Runtime counters: /sys/.../*.gcda and hiperlinks to *.gcno - Compile-time cross-reference object files: *.gcno - Kernel source code. If the build machine is different than the source machine, some special scripts are needed in order to either copy the source files to the runtime machine or vice versa. This is described at: https://www.kernel.org/doc/html/latest/dev-tools/gcov.html Copy the two scripts described there as-is. Further patches will modify them as needed. Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2021-04-06Get rid of GNU AutotoolsArkadiusz Hiler
Autotools have been deprecated in favor of Meson since early 2019. Signed-off-by: Arkadiusz Hiler <arek@hiler.eu> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Petri Latvala <petri.latvala@intel.com>
2021-04-01scripts/trace.pl: Remove the toolTvrtko Ursulin
Tool has been broken for a while after changes to tracepoint format an behaviour. Although I have patches somewhere to mostly fix it, it seems that it has outlived its usefulness and could be deleted just as well. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Matthew Auld <matthew.auld@intel.com>
2020-06-19gem_wsim: Rip out userspace balancingTvrtko Ursulin
Evaluation of userspace load balancing options was how this tool started but since we have settled on doing it in the kernel. Tomorrow we will want to update the tool for new engine interfaces and all this legacy code will just be a distraction. Rip out everything not related to explicit load balancing implemented via context engine maps and adjust the workloads to use it. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-06-17scripts/verify-blacklist: Script for checking blacklist filesPetri Latvala
tests/intel-ci/blacklist*.txt files can collect bitrot unless there's an easy way to check for lines that are no longer needed due to the tests being renamed or removed. Therefore, a script just for that. v2: Use long options for readability, exit with 1 if something found v3: Verify manually against the list of all tests instead of trying with igt_runner's --include-tests Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-06-15scripts/generate_clear_kernel: Improve usage instructions.Rodrigo Vivi
Fix the script name and make the path to mesa i915_asm a bit more clear Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2020-06-12scripts/run-tests.sh: also search path for runner binariesStefan Agner
To make the script also useful when igt_runner/igt_resume binarires are installed, also search PATH for the binaries. Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2020-02-27scripts/generate_clear_kernel: Add script to assemble CB kernelAkeem G Abodunrin
This patch adds script and applicable assembly sources, so that we can use igt to assemble Clear Batch Buffer kernel for gen7 and gen7.5 devices - Resultant header files would be imported to i915, and used as they are... With this patch, user need to have mesa configured on their platform, before igt could be used to achieve the purpose of assembling the kernel from source. This is needed for "Security mitigation for Intel Gen7/7.5 HWs" Intel ID: PSIRT-TA-201910-001/CVEID: CVE-2019-14615 v2: Addressed formatting, -g option and other minor issues (Petri) v3: Update script due to suggested changes in i915, and Mesa tool v4: Update help comment with Mesa build option with meson (Petri) v5: Modify how user specify i965_asm - script now takes binary, instead of Mesa tool source directory (Ville). v6: Update script to reflect Mesa tool final changes to assemble CB kernel - and renamed files based on Petri's suggestion... Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Bloomfield Jon <jon.bloomfield@intel.com> Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-11-29scripts/run-tests.sh: Use the filter flag values when listing testsPetri Latvala
Testcase: scripts/run-tests.sh -l -T fast-feedback.testlist -x vgem_basic Previously the filters (-T for testlist, -t/-x for regex include/exclude) were silently dropped when listing tests. Actually use them for listing, since that works properly when using igt_runner. Warning for those using piglit (the -p flag): The -x flag for listing with piglit is the same as -t at this time: https://gitlab.freedesktop.org/mesa/piglit/issues/29 v2: Remember to git add after removing debug echos instead of breaking CI Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-09-17run-tests.sh: Use igt_runner instead of piglit by defaultPetri Latvala
The old behaviour of running everything with piglit with the script is now behind the flag -p. When using igt_runner and its pals, -b now takes a blacklist file á la tests/intel-ci/blacklist.txt. Additional useful command line flags for igt_runner, like the various forms of --abort-on-monitored-error or --dmesg-warning-level are not supported. The main supported form of running tests is igt_runner directly. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-05-22wsim/media-bench: i915 balancingTvrtko Ursulin
Support i915 virtual engine from gem_wsim (-b i915) and media-bench.pl v2: * Add vm_destroy. (Chris) * Remove unneeded braces. (Chris) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-05-22trace.pl: Virtual engine preemption supportTvrtko Ursulin
Use the 'completed?' tracepoint field to detect more robustly when a request has been preempted and remove it from the engine database if so. Otherwise the script can hit a scenario where the same global seqno will be mentioned multiple times (on an engine seqno) which aborts processing. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-05-22trace.pl: Virtual engine supportTvrtko Ursulin
Add virtual/queue timelines to both stdout and HTML output. A new timeline is created for each queue/virtual engine to display associated requests in queued and runnable states. Once requests are submitted to a real engine for executing they show up on the physical engine timeline. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-05-22trace.pl: Ignore signaling on non i915 fencesTvrtko Ursulin
gem_wsim uses the sw_fence timeline and confuses the script. v2: * Check the correct timeline as well. (Chris) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-05-22scripts/trace.pl: Fix after intel_engine_notify removalTvrtko Ursulin
After the removal of engine global seqnos and the corresponding intel_engine_notify tracepoints the script needs to be adjusted to cope with the new state of things. To keep working it switches over using the dma_fence:dma_fence_signaled: tracepoint and keeps one extra internal map to connect the ctx-seqno pairs with engines. It also needs to key the completion events on the full engine/ctx/seqno tokens, and adjust correspondingly the timeline sorting logic. v2: * Do not use late notifications (received after context complete) when splitting up coalesced requests. They are now much more likely and can not be used. v3: * Pull a hunk which moved forward during rebases back here. v4: * Drop ctxengines approach since it cannot handle requests moving across engines. ctx/seqno pair is unique anyway so enough. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> # v3
2019-05-14benchmarks/gem_wsim: Perturb static_vcs selection across clientsChris Wilson
Use the client id to alternate the static_vcs balancer (-b context) across clients with the round robin flag (-R) - otherwise all clients end up on vcs0 and do not match the context balancing employed by media-driver. v2: Put it behind the -R flag. v3: Don't skip -R flag for -b context in scripts/media-bench.pl Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-09-14media-bench: Add mixed mode evaluationTvrtko Ursulin
Mixed mode (-m) enables evaluation of different workload sets against one or more load balancing strategies. Contrary to the default mode which runs all selected workloads serialy, mixed mode runs a second stage where they are all run in parallel. The performance difference between the two passes is then used for the scoring metric. First metric is the normalized aggregate throughput, and second is balancer "fairness" as approximated by throughput achieved in mixed mode, relative to the best individual balancer for each workload. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-14media-bench: Write out trace files directly.Tvrtko Ursulin
Instead of relying on shell redirection. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-14media-bench: Fix tracing of direct workloadsTvrtko Ursulin
Build argument list properly and check exit codes when executing sub-commands. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-14media-bench: Protect against incorrect -b syntaxTvrtko Ursulin
-b is to pass the command argument directly to gem_wsim so must include another -b. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-14media-bench: Update for engine=class:instance tracepointsTvrtko Ursulin
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-14trace.pl: Use undocumented -o to perf record to allow teeTvrtko Ursulin
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-14trace.pl: Fix frequency timelineTvrtko Ursulin
Frequency timeline needs to be finished with an entry spanning to the end of known time so that the last known frequency is displayed. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-08-02trace.pl: Bring back timeline stackingTvrtko Ursulin
Bring back the button which expands/stacks overlapping timeline boxes. We default to no stacking, but sometimes expanding the view can be useful, especially with deep request pipelines. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
2018-08-02trace.pl: Fix request split modeTvrtko Ursulin
Request split mode had several bugs, both in the original version and also after the recent refactorings. One big one was that it wasn't considering different submit ports as a reason to split execution, and also that it was too time based instead of looking at relevant timelines. In this refactoring we address the former by using the engine timelines introduced in the previous patch. Secondary port submissions are moved to follow the preceding submission as a first step in the correction process. In the second step, we add context timelines and use then in a similar fashion to separate start and end time of coalesced requests. For each coalesced request we know its boundaries by looking at the engine timeline (via global seqnos), and we know the previous request it should only start after, by looking at the context timeline. v2: * Remove some dead code. * Fix !port0 shifting logic. v3: * Refactor for less list walking as with incomplete handling. v4: * Database of context timelines should not contain duplicates! (Converted from array into a hash.) v5: * Avoid over-accounting runnable time for a coalesced group by recording the time first request entered the GPU and ending the execute delay at that point for the whole group. v6: * Update for engine class:instance. 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>
2018-08-02trace.pl: Context save only applies to last request of a bunchTvrtko Ursulin
Skip accounting the context save time for anything but the last request of the coalesced bunch, and also skip drawing those boxes on the timeline. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
2018-07-19trace.pl: Basic preemption supportTvrtko Ursulin
Just forget about earlier request_in events. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
2018-07-19trace.pl: Fix incomplete request handlingTvrtko Ursulin
Incomplete requests (no notify, no context complete) have to be corrected by looking at the engine timeline, and not the sorted-by-start-time view as was previously used. Per-engine timelines are generated on demand and cached for later use. v2: Find end of current context on the engine timeline instead of just using the next request for adjusting the incomplete start time. v3: Improve scaling with large datasets by only walking each engine timeline once and some caching. (John Harrison) v4: * Fix logic fail from v3. * Refactor the code a bit to separate the stages better. * Do not account batches with unknown duration in avg stats. * Handle two user interrupts with the same seqno. * Handle user interrupt arriving after request_out. v5: * Update for class:instance. 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>
2018-07-19trace.pl: Improved key/coloursJohn Harrison
Improve the timeline legend to show actual context colours. v2: (Tvrtko Ursulin) * Commit msg. * Tweak layout for more compactness and more readability. v3: * Limit number of shown contexts in the legend. (John Harrison) v4: * Unbreak legend display with small context counts. (John Harrison) Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
2018-07-19trace.pl: Improve context colouring for large context id'sTvrtko Ursulin
John reports that on a long runnning systems the huge disparity between kernel context and user context id's causes all interesting colours to be clustered too close together. Fix this by assigning colours to seen contexts instead of basing purely on context id's. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Suggested-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>
2018-07-19trace.pl: Improve readability of graphical timeline representationTvrtko Ursulin
We add stripes for different stages of request execution so it is easier to follow one context in the multi-colour mode. Vertical stripe pattern indicates pipeline "blockages" - requests waiting for dependencies before they are runnable. Diagonal stripes indicate runnable requests waiting for GPU time. Horizontal strips are requests executing on the GPU. Also use this new multi-coloured mode from media-bench.pl. v2: John Harrison: * Mention media-bench.pl in the commit. * Fix HTML for single colour mode. v3: * Rebase. * Apply stripes to legacy colouring as well. v4: John Harrison: * Use per context colours for ctxsave and incomplete boxes. * Clearer timeline legend. 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>
2018-07-19trace.pl: Improve time axis labelsTvrtko Ursulin
It is possible to customize the axis display so change it to display timestamps in seconds on the major axis (with six decimal spaces) and millisecond offsets on the minor axis. v2: * Give up on broken relative timestamps. v3: * Drop all date complications and just use micro seconds throughout. (John Harrison) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
2018-07-12trace.pl: Fix engine busy accounting in split modeTvrtko Ursulin
In split mode all requests have to be added up since they were previously re-arranged so there is no overlap. 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>
2018-07-12trace.pl: Put single context at single vertical slotTvrtko Ursulin
Turn off timeline stacking in favour of putting all the boxes belonging to a single context at the same vertical slot. Also remove the custom sorting function in favour of correctly assigning the subgroup id's and order which greatly speeds up the library operations. And finally remove the 'Toggle stacking' button which never worked. 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>