summaryrefslogtreecommitdiffstats
path: root/src/glx/dri_common_query_renderer.c
diff options
context:
space:
mode:
authorChris Wilson <[email protected]>2017-07-11 16:54:25 +0100
committerKenneth Graunke <[email protected]>2017-07-11 14:07:47 -0700
commitcead51a0c63df1613f9f6400657597679126024c (patch)
treed04a7951078bbef5f0fb3146454316fd110624e7 /src/glx/dri_common_query_renderer.c
parent314879f7fec07cedb5263681173a22d522a8ac9a (diff)
i965: Use VALGRIND_MAKE_MEM_x in place of MALLOCLIKE/FREELIKE
Valgrind doesn't actually implement VALGRIND_FREELIKE_BLOCK as the exact inverse of VALGRIND_MALLOCLIKE_BLOCK. It makes the block inaccessible, but still leaves it defined in its allocation tracker i.e. it will report the mmap as lost despite the call to FREELIKE! Instead of treating the mmap as an allocation, treat it as changing the access bits upon the memory, i.e. that it becomes defined (because of the buffer objects always contain valid content from the user's perspective) upon mmap and inaccessible upon munmap. This makes memcheck happy without leaving it thinking there is a very large leak. Finally for consistency, we treat all the mmap/munmap paths the same even though valgrind can intercept the regular mmap used for GTT. We could move this in the drm_mmap/drm_munmap macros, but that quickly looks ugly given the desire for those to support different OSes, but I didn't try that hard! Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glx/dri_common_query_renderer.c')
0 files changed, 0 insertions, 0 deletions