As the driver itself keeps a cache of objects, these too need to be
flushed prior to producing a stable count of objects.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102655
Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
---
 lib/igt_debugfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 60b29e3a..8b33b478 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -1128,7 +1128,8 @@ static int get_object_count(int fd)
 {
        int dir, ret, scanned;
 
-       igt_drop_caches_set(fd, DROP_RETIRE | DROP_ACTIVE | DROP_FREED);
+       igt_drop_caches_set(fd,
+                           DROP_RETIRE | DROP_ACTIVE | DROP_IDLE | DROP_FREED);
 
        dir = igt_debugfs_dir(fd);
        scanned = igt_sysfs_scanf(dir, "i915_gem_objects",
-- 
2.15.0.rc1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to