diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-04-06 21:50:12 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-09-19 12:02:53 +0100 |
commit | 9690d0aeedff96ebf761252966aa19471ac93bc1 (patch) | |
tree | d8892d33548a129e1580b8b7240a71f21b244213 /lib | |
parent | 200237acac00f24730b0c5b4362936b6c510b0ed (diff) |
lib: Add support for DROP_FREED in igt_drop_caches_set()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/drmtest.c | 2 | ||||
-rw-r--r-- | lib/igt_debugfs.c | 2 | ||||
-rw-r--r-- | lib/igt_debugfs.h | 9 |
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c index e76568004..40bbff6e9 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -180,7 +180,7 @@ void gem_quiescent_gpu(int fd) gem_sync(fd, obj.handle); gem_close(fd, obj.handle); - igt_drop_caches_set(DROP_RETIRE); + igt_drop_caches_set(DROP_RETIRE | DROP_FREED); } /** diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index cd70ea1d2..fb13a88bf 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -737,7 +737,7 @@ static int get_object_count(void) FILE *file; int ret, scanned; - igt_drop_caches_set(DROP_RETIRE | DROP_ACTIVE); + igt_drop_caches_set(DROP_RETIRE | DROP_ACTIVE | DROP_FREED); file = igt_debugfs_fopen("i915_gem_objects", "r"); diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index 988025f94..8289e9d09 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -157,6 +157,12 @@ void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc); */ #define DROP_ACTIVE 0x8 /** + * DROP_FREED: + * + * Also drop freed objects. + */ +#define DROP_FREED 0x10 +/** * DROP_ALL: * * All of the above DROP_ flags combined. @@ -164,7 +170,8 @@ void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc); #define DROP_ALL (DROP_UNBOUND | \ DROP_BOUND | \ DROP_RETIRE | \ - DROP_ACTIVE) + DROP_ACTIVE | \ + DROP_FREED) void igt_drop_caches_set(uint64_t val); |