[PATCH i-g-t 7/8] Object stats + self
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Mon Jul 11 06:27:25 UTC 2022
---
tests/i915/gem_ppgtt.c | 37 +++++++++++++++++++++----------------
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppgtt.c
index 576a4098da..7982287359 100644
--- a/tests/i915/gem_ppgtt.c
+++ b/tests/i915/gem_ppgtt.c
@@ -47,7 +47,6 @@
static void dump_file(const char *info, const char *filename, int lines)
{
-#if 0
FILE *file;
size_t n = 0;
char *line = NULL;
@@ -61,7 +60,6 @@ static void dump_file(const char *info, const char *filename, int lines)
free(line);
fclose(file);
-#endif
}
static struct intel_buf *create_bo(struct buf_ops *bops, uint32_t pixel)
@@ -307,8 +305,9 @@ static void dump_object_stats(int interval, int timeout)
i915 = drm_open_driver(DRIVER_INTEL);
for (int n = 0; n < timeout; n += interval) {
- igt_debugfs_dump(i915, "i915_gem_objects");
- sleep(interval);
+ dump_file("-----------------------------\nOBJECT STATS", "/proc/self/status", 1 << 30);
+ igt_debugfs_dump(i915, "i915_gem_objects");
+ sleep(interval);
}
close(i915);
}
@@ -334,15 +333,17 @@ igt_main
int timeout = 30;
/* Temporary meminfo dump*/
- dump_file("meminfo before drop-caches", "/proc/meminfo", 16);
- dump_file("slabinfo before drop-caches", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nmeminfo before drop-caches", "/proc/meminfo", 16);
+ dump_file("-----------------------------\nslabinfo before drop-caches", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nstatus before drop-caches", "/proc/self/status", 1 << 30);
mem_per_test = SIZE;
igt_require_memory(nchild + 1, mem_per_test, CHECK_RAM);
/* SNB */
- dump_file("meminfo after drop-caches", "/proc/meminfo", 16);
- dump_file("slabinfo after drop-caches", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nmeminfo after drop-caches", "/proc/meminfo", 16);
+ dump_file("-----------------------------\nslabinfo after drop-caches", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nstatus after drop-caches", "/proc/self/status", 1 << 30);
rcs = calloc(sizeof(*rcs), nchild);
igt_assert(rcs);
@@ -362,8 +363,9 @@ igt_main
free(rcs);
/* SNB */
- dump_file("meminfo finish", "/proc/meminfo", 16);
- dump_file("slabinfo finish", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nmeminfo finish", "/proc/meminfo", 16);
+ dump_file("-----------------------------\nslabinfo finish", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nstatus finish", "/proc/self/status", 1 << 30);
}
igt_subtest("blt-vs-render-ctxN") {
@@ -375,14 +377,16 @@ igt_main
igt_require(has_contexts());
- dump_file("meminfo before drop-caches", "/proc/meminfo", 16);
- dump_file("slabinfo before drop-caches", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nmeminfo before drop-caches", "/proc/meminfo", 16);
+ dump_file("-----------------------------\nslabinfo before drop-caches", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nstatus before drop-caches", "/proc/self/status", 1 << 30);
mem_per_test = SIZE + mem_per_ctx;
igt_require_memory(1 + nchild, mem_per_test, CHECK_RAM);
- dump_file("meminfo after drop-caches", "/proc/meminfo", 16);
- dump_file("slabinfo after drop-caches", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nmeminfo after drop-caches", "/proc/meminfo", 16);
+ dump_file("-----------------------------\nslabinfo after drop-caches", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nstatus after drop-caches", "/proc/self/status", 1 << 30);
rcs = calloc(sizeof(*rcs), nchild);
igt_assert(rcs);
@@ -401,8 +405,9 @@ igt_main
cleanup_bufs(rcs, nchild);
free(rcs);
- dump_file("meminfo finish", "/proc/meminfo", 16);
- dump_file("slabinfo finish", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nmeminfo finish", "/proc/meminfo", 16);
+ dump_file("-----------------------------\nslabinfo finish", "/proc/slabinfo", 1 << 30);
+ dump_file("-----------------------------\nstatus finish", "/proc/self/status", 1 << 30);
}
igt_subtest("flink-and-close-vma-leak")
--
2.34.1
More information about the Intel-gfx-trybot
mailing list