diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-05 13:33:25 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-05 13:34:02 +0100 |
commit | b428f24f7caa1286cdcf0794078547f3b27e69b3 (patch) | |
tree | 7109ba702e033ae1bad8918028e48c740d621364 /lib | |
parent | a1a8aa16fb4e27a267f4ac12883419114a020dd7 (diff) |
lib: Add debug to memory limits checks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/intel_os.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/intel_os.c b/lib/intel_os.c index e717c7b5..83368c29 100644 --- a/lib/intel_os.c +++ b/lib/intel_os.c @@ -195,6 +195,11 @@ bool intel_check_memory(uint32_t count, uint32_t size, unsigned mode) required *= size + KERNEL_BO_OVERHEAD; required = ALIGN(required, 4096); + igt_debug("Checking %u surfaces of size %u bytes (total %llu) against %s%s\n", + count, size, (long long)required, + mode & (CHECK_RAM | CHECK_SWAP) ? "RAM" : "", + mode & CHECK_SWAP ? " + swap": ""); + total = 0; if (mode & (CHECK_RAM | CHECK_SWAP)) total += intel_get_avail_ram_mb(); @@ -206,7 +211,7 @@ bool intel_check_memory(uint32_t count, uint32_t size, unsigned mode) igt_log(IGT_LOG_INFO, "Estimated that we need %llu bytes for the test, but only have %llu bytes available (%s%s)\n", (long long)required, (long long)total, - mode & CHECK_RAM ? "RAM" : "", + mode & (CHECK_RAM | CHECK_SWAP) ? "RAM" : "", mode & CHECK_SWAP ? " + swap": ""); return 0; } |