Age | Commit message (Collapse) | Author |
|
Ask for CLOCK_MONOTONIC which is more stable than the default perf clock.
(Ability to select a clock has been available since kernel version 4.1.)
The change should not have any significant impact on the IGT as whole
apart from maybe improving the occasional jitter in tests/tools which use
nanosleep(2) and use time slept together with perf reported time delta
either in direct or indirect calculations.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since with multiple devices, we may have multiple different perf_pmu
each with their own type, we want to find the right one for the job.
The tests are run with a specific fd, from which we can extract the
appropriate bus-id and find the associated perf-type. The performance
monitoring tools are a little more general and not yet ready to probe
all device or bind to one in particular, so we just assume the default
igfx for the time being.
v2: Extract the bus address from out of sysfs
v3: A new name for a new decade!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "Robert M. Fosha" <robert.m.fosha@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: "Robert M. Fosha" <robert.m.fosha@intel.com> #v2
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
intel-gpu-top is a dangerous tool which can hang machines due unsafe mmio
register access. This patch rewrites it to use only PMU.
Only overall command streamer busyness and GPU global data such as power
and frequencies are included in this new version.
For access to more GPU functional unit level data, an OA metric based tool
like gpu-top should be used instead.
v2:
* Sort engines by class and instance.
* Do not wait for one sampling period to display something on screen.
* Move code out of the asserts. (Rinat Ibragimov)
* Continuously adapt to terminal size. (Rinat Ibragimov)
v3:
* Change layout and precision of some field. (Chris Wilson)
Eero Tamminen:
* Use more user friendly engine names.
* Don't error out if a counter is missing.
* Add IMC read/write bandwidth.
* Report minimum required kernel version.
v4:
* Really support 4.16 by skipping of missing engines.
* Simpler and less hacky float printing.
* Preserve copyright header. (Antonio Argenziano)
* Simplify engines_ptr macro. (Rinat Ibragimov)
v5:
* Get RAPL unit from sysfs.
* Consolidate sysfs paths with a macro.
* Tidy error handling by carrying over and reporting errno.
* Check against console height on all prints.
* More readable minimum kernel version message. (Eero Tamminen)
* Column banner for per engine stats. (Eero Tamminen)
v6:
* Man page update. (Eero Tamminen)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Eero Tamminen <eero.t.tamminen@intel.com>
Cc: Rinat Ibragimov <ibragimovrinat@mail.ru>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> # v1
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> # v0.5
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
|
|
Instead of assuming PMU runs on CPU0, try all possible CPUs if that is not
the case. This makes the callers handle fallout from broken tests better,
as well as sysadmin interventions where callers are not tests.
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>
|
|
Wire up to the RAPL PMU for GPU energy readings.
The only complication is that we have to add code to parse:
# cat /sys/devices/power/events/energy-gpu.scale
2.3283064365386962890625e-10
v2: Link with -lm.
v3: strtod can handle scientific notation, even though my initial
reading of the man page did not spot that. (Chris Wilson)
v4: Meson fix.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Configuration and format are uint64_t in the perf API.
Tidy some other details as well.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Various tool modules implement their owm PMU open wrapper which
can be replaced by calling the library one.
v2:
* Remove extra newline. (Chris Wilson)
* Commit msg.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Idea is to avoid duplication across multiple users in
upcoming patches.
v2: Commit message and use a separate library instead of piggy-
backing to libintel_tools. (Chris Wilson)
v3: Add Petri's meson build recipe.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|