summaryrefslogtreecommitdiff
path: root/benchmarks
AgeCommit message (Collapse)Author
2019-03-29Revert "lib/igt_device: Move intel_get_pci_device under igt_device"Ville Syrjälä
One significant usecase for intel_reg/etc. is to be able to examine the hardware state *before* loading the driver. If the tool forces the driver to load we've totally lost that capability. This reverts commit 8ae86621d6fff60b6e20c6b0f9b336785c935b0f. Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Michał Winiarski <michal.winiarski@intel.com>
2019-03-20lib/igt_device: Move intel_get_pci_device under igt_deviceMichał Winiarski
It allows us to make things a little bit more generic. Also, we now require fd rather than doing guesswork when it comes to pci address. v2: Use readlinkat rather than string concat, move stuff around, provide a version that does not assert. (Chris) v3: Print addr on failure, avoid assignment in conditionals. (Chris) Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-04automake: Make librt mandatoryTvrtko Ursulin
librt is required by libintel_tools so express it as mandatory in autoconf and also drop explicit mentions from Makefile.am. This also fixes a build warning of: tests/Makefile.am:134: warning: variable 'pm_rc6_residency_LDADD' is defined but no program or tests/Makefile.am:134: library has 'pm_rc6_residency' as canonical name (possible typo) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-01gem_wsim: Remove some unused struct membersTvrtko Ursulin
We do not bother explicitly unmapping memory on exit so no need to store address and size in the workload step struct. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-01gem_wsim: Round mmap to page sizeTvrtko Ursulin
mmap(2) mandates size is page aligned. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-02-26lib/i915: Move mmap IOCTLs wrappers into separate fileAntonio Argenziano
Move all mmap flavours and support function to separate file in i915 folder. This helps with moving i915 specific functions away from common libraries. v2: - Autotools still exists. (Petri) - Include gem_mman.h directly. (Chris) v3: - Keep includes explicit. (Chris) Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-02-20benchmarks/meson: Stop renaming benchmarksArkadiusz Hiler
Meson 0.46.0 fixes the issue that forced us to do the renaming. Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-01-29automake: Ditch all EXTRA_DIST directivesDaniel Vetter
We're not using automake to build tarballs anymore. Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-01-21benchmarks/gem_userptr_benchmark: Correctly free memoryPetri Latvala
if (p) free(p) does a useless check, free(NULL) is a valid call. Also assign NULL so we don't end up double-freeing memory if anyone reorders nr_bos to have a 0 after other values. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-01-21benchmarks/wsim: Handle a parse errorPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-09-14gem_wsim: Per context preemption point controlTvrtko Ursulin
Allow workloads to specify frequency of preemption points per context. New workload command ('X') is added to allow this. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-14gem_wsim: Make batches preemptable by defaultTvrtko Ursulin
MI_NOOP cannot be preempted which means up to now gem_wsim workloads were preemptable on batch buffer granularity only. Add MI_ARB_CHK every 100us so the new default is mid-batch preemption. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-14gem_wsim: Context priority supportTvrtko Ursulin
A new workload command ('P') is added which enables per context dynamic priority control. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-14gem_wsim: Make workload commands case sensitiveTvrtko Ursulin
Need namespace for new commands and I never documented they are case insensitive so it is fine. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-14gem_wsim: Fix BCS usage under VCS2 remap warningTvrtko Ursulin
Need to check we actually are in VCS2 remapping mode! Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-07-25build: provide include for missing syscallsLucas De Marchi
Add directory with README file to allow missing syscalls to be defined. The syscalls themselves will be provided in follow up patches. v2: add support to autotools Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-06-25meson: Add options to control optional partsPetri Latvala
Distributions want explicit control over optional parts so they can state runtime dependencies before building. Let's restore the functionality autotools used to provide. Where possible, the selection is done by choosing whether to build a particular item and the option name is build_$item. Example: build_overlay. Where not possible, the option name is with_$item. Example: with_valgrind. Array options require a bump of required meson version to 0.44. Debian stable has meson 0.37 which is already too old, stable-backports has 0.45, CI uses 0.45. Mesa's meson requirement is 0.44.1, for a perspective. Note, the old hack for not building docs when cross-compiling is gone, as doc building can be explicitly controlled now. v2: glib not optional v3: bump meson version to 0.44 Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Eric Anholt <eric@anholt.net> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-05-24benchmarks/gem_syslatency: Specify batch durationChris Wilson
While for stressing the system we want to submit as many batches as we can as that shows us worst case impact on system latency, it is not a very realistic case. To introduce a bit more realism allow the batches run for a user defined duration. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-05-24benchmarks/gem_syslatency: Allow limiting to just 1 CPU hogChris Wilson
Normally we use a hog per CPU to ensure that the system is fully loaded to see how much latency we cause. For simple sanitychecking, allow ourselves to limit it to just one CPU hog. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-05-24benchmarks/gem_syslatency: Pass a write hazard aroundChris Wilson
Extend the i915 load to (optionally) pass a write hazard between engines, causing us to wait on the interrupt between engines. Thus adding MI_USER_INTERRUPT irq handling to our list of sins. 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-05-16igt: Drop Intel from the name in docs and pathsArkadiusz Hiler
This is just a simple change to reflect the actual state. No rewording yet, just a simple substitution in most visible places - docs, README and paths. There are probably some leftovers here and there, but we can let them be for now, this is already well overdue. v2: fixed couple of obvious leftovers pointed out by Petri Cc: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-05-07lib: drop drmtest dependency on intel_batchbufferLionel Landwerlin
It doesn't look like there should be a dependency there. v2: s/intel_batchbuffer/intel_reg/ v3: One more s/intel_batchbuffer/intel_reg/ in benchmarks Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-03-26lib/dummyload: Add pollable spin batchTvrtko Ursulin
Pollable spin batch exports a spin->running pointer which can be checked by dereferencing it to see if the spinner is actually executing on the GPU. This is useful for tests which want to make sure they do not proceed with their next step whilst the spinner is potentially only being processed by the driver and not actually executing. Pollable spinner can be created with igt_spin_batch_new_poll or __igt_spin_batch_new_poll, after which igt_spin_busywait_until_running can be used to busy wait until it is executing. v2: * Move READ_ONCE to igt_core. * Add igt_spin_busywait_until_running. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-07lib: Move __gem_context_create to common ioctl wrapper library.Antonio Argenziano
This patch adds a context creation ioctl wrapper that returns the error for the caller to consume. Multiple tests that implemented this already, have been changed to use the new library function. v2: - Add gem_require_contexts() to check for contexts support (Chris) v3: - Add gem_has_contexts to check for contexts support and change gem_require_contexts to skip if contests support is not available. (Chris) v4: - Cosmetic changes and use lib function in gem_ctx_create where possible. (Michal) v5: - Use gem_contexts_require() in tests and fixtures. (Chris) Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-01-17meson: Refactor get_option() calls for directoriesPetri Latvala
Fetch the configuration values in the toplevel meson.build for all subdirs to share. v2: Also remember tests/intel-ci/meson.build Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-12-21meson: Install benchmarks to $libexec/intel-gpu-tools/benchmarksPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-12-05meson: build a full dependency for lib_igt_perfDaniel Vetter
meson prefers packages dependencies over passing arount static libraries, because those also include linker flags, include dirs and everything else. While at it pull the special cases out from the common build stanzas like we do with other special cases. Just a bit of ocd to keep everything polished. v2: Don't forget to add perf_pmu to the test list (Petri). Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-11-29igt: Remove Android supportArkadiusz Hiler
This patch gets rid of the Android support, deleting all the hacks and moving code around to the places it belongs. Android build is not really maintained properly and rots rather fast. With recent push for Meson here and Android going for Soong it will only accelerate. It's a good time to drop the illusion of providing any support. Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Kalyan Kondapally <kalyan.kondapally@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-11-22gem_syslatency: Avoid arithmetic on void * warningTvrtko Ursulin
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-11-22automake: include drm-uapi headers in EXTRA_DISTDaniel Vetter
This breaks make distcheck otherwise. Cc: Eric Anholt <eric@anholt.net> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Tested-by: Petri Latvala <petri.latvala@intel.com>
2017-11-22gem_wsim: Busy stats balancersTvrtko Ursulin
Add busy and busy-avg balancers which make balancing decisions by looking at engine busyness via the i915 PMU. And thus are able to make decisions on the actual instantaneous load of the system, and not use metrics that lag behind by a batch or two. In doing so, each client should be able to greedily maximise their own usage of the system, leading to improved load balancing even in the face of other uncooperative clients. On the other hand, we are only using the instantaneous load without coupling in the predictive factor for dispatch and execution length. v2: * Commit text. (Chris Wilson) * Rename get_stats to get_pmu_stats. (Chris Wilson) * Fix PMU readout in VCS remap mode. v3: * Integrated Petri's meson build recipe. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com>
2017-11-21benchmarks/gem_exec_nop: fix engines selectionDmitry Rogozhkin
Code on loop() function shadowed function parameter which led to inability to try out different engines in the test: we always loaded RCS0. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103804 Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-21lib: Use drm-uapi/i915_drm.h instead of local defines.Eric Anholt
The MMAP_V2 is replaced by just using MMAP, since the official header has the updated struct. The gem_create_v2 and gem_get_aperture are left as is, because they seem to not be reflected in the UABI header! Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-12benchmark/gem_busy: Compare polling with syncobj_waitChris Wilson
v2: Hook the syncobj array to the execbuf! 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>
2017-10-03Fix rlim_cur compiler warnings when building on ARM.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-02meson: Distribute meson build system filesPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-02benchmarks: Add ezbench.d files to distPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-02benchmarks: Add wsim files to distPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-29benchmarks: Actually build LIBDRM_INTEL_BENCHMARKSPetri Latvala
Adding LIBDRM_INTEL_BENCHMARKS into benchmarks_PROGRAMS had a tab before the assignment, making the line be inserted into the Makefile as is instead of being evaluated by automake. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-09-28benchmarks/gem_exec_fault: Update for tryhard kernels.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-09-28benchmarks/gem_syslatency: Apply vmpressure, measure page allocationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-09-08meson: basic build system supportDaniel Vetter
Why? Because it's fast. Like really, really fast. Some data (from a snb laptop, so rather lower-powered): - Incremental build after $ touch lib/igt_core.c with meson: 0.6s It notices that the symbol list of the libigt.so hasn't changed and doesn't bother re-linking the almost 300 binaries we have. make -j 6 for the same scenario takes 44s. - Incremental build with nothing changed: make: 0.7s, meson: 0.2s This means stuff like --disable-git-hash is entirely pointless with meson, it's faster than a make ever can be (with 0.6s). - Reconfigure stage: ninja reconfigure 0.8s vs. ./configure 8.6s) - Running tests, after a full build: ninja test 6s vs. make check 24s - Full build (i.e. including ./autogen.sh respectively meson build), including tests, from a pristine git checkout. automake 2m49s vs. meson 44s. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Eric Anholt <eric@anholt.net> Cc: Daniel Stone <daniel@fooishbar.org> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-09-08build: remove _GNU_SOURCE from source filesDaniel Vetter
We are, the build system takes care of that. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08build: Define _GNU_SOURCE in Makefile.amDaniel Vetter
In meson I want to just set this everywhere (no reason not to), and doing so will allow us to clean up a few things. But that means autofoo needs to follow suit. v2: Rebase. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-07-11igt: Add LOCAL defines for distro compatibilityArkadiusz Hiler
Each Linux distro takes a different spin on providing kernel's uapi headers (especialy the *drm*.h). You can get them with linux-headers, you can get them with libdrm. Sometime you can even get them twice, from both sources. Sometimes the headers match your kernel version, sometimes you end up stuck with headers matching the kernel that the given release of the distro came out with. This makes things harder for code that does not depend on libdrm, as we cannot have sane ./configure-time checks. So let's define LOCAL_ version for FENCE and EXECBUFFER2_WB defines until all the stable distros catch up (+/- some epsilon). Cc: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-06-09benchmarks/gem_busy: Trim unused comparesChris Wilson
Keep userspace light and don't spend time testing the result if we don't use it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-06-08gem_wsim: More interesting workloadsTvrtko Ursulin
These ones demonstrate fence usage and also mixing them with data dependencies. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-06-08gem_wsim: Add some randomness to the 17i7 workloadTvrtko Ursulin
It was the only one with no randomness. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-06-08gem_wsim: Asymmetrical 1-to-n workloadsTvrtko Ursulin
Simulates a single decoder feeding multiple processing and encoding pipelines. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-06-08gem_wsim: Fix heartbeats in GT2 modeTvrtko Ursulin
VCS2 needs to be redirected to BCS in the remapping mode otherwise the update will get missed. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>