[Intel-gfx] [PATCH igt 3/4] lib: Flush the driver's internal cache of objects before counting

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 18 12:34:27 UTC 2017


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 <chris at 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



More information about the Intel-gfx mailing list