Module: Mesa
Branch: main
Commit: ad5c9c3fa46a4bb6a423c347f28e2d6a58973b2b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad5c9c3fa46a4bb6a423c347f28e2d6a58973b2b

Author: Eric Engestrom <[email protected]>
Date:   Thu Nov 10 19:16:02 2022 +0000

llvmpipe: drop cache stats code

Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Emma Anholt <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Tested-by: Chris Healy <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19644>

---

 src/gallium/drivers/llvmpipe/lp_debug.h  | 2 +-
 src/gallium/drivers/llvmpipe/lp_screen.c | 7 -------
 src/gallium/drivers/llvmpipe/lp_screen.h | 2 --
 3 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_debug.h 
b/src/gallium/drivers/llvmpipe/lp_debug.h
index b74c952552b..4f4fc528f35 100644
--- a/src/gallium/drivers/llvmpipe/lp_debug.h
+++ b/src/gallium/drivers/llvmpipe/lp_debug.h
@@ -46,7 +46,7 @@
 #define DEBUG_FS            0x8000
 #define DEBUG_CS            0x10000
 #define DEBUG_TGSI_IR       0x20000
-#define DEBUG_CACHE_STATS   0x40000
+// unused                   0x40000
 #define DEBUG_NO_FASTPATH   0x80000
 #define DEBUG_LINEAR        0x100000
 #define DEBUG_LINEAR2       0x200000
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c 
b/src/gallium/drivers/llvmpipe/lp_screen.c
index ef8b95bf20a..444fb64ec84 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -79,7 +79,6 @@ static const struct debug_named_value lp_debug_flags[] = {
    { "fs", DEBUG_FS, NULL },
    { "cs", DEBUG_CS, NULL },
    { "tgsi_ir", DEBUG_TGSI_IR, NULL },
-   { "cache_stats", DEBUG_CACHE_STATS, NULL },
    { "accurate_a0", DEBUG_ACCURATE_A0 },
    DEBUG_NAMED_VALUE_END
 };
@@ -865,10 +864,6 @@ llvmpipe_destroy_screen(struct pipe_screen *_screen)
 
    lp_jit_screen_cleanup(screen);
 
-   if (LP_DEBUG & DEBUG_CACHE_STATS)
-      printf("disk shader cache:   hits = %u, misses = %u\n",
-             screen->num_disk_shader_cache_hits,
-             screen->num_disk_shader_cache_misses);
    disk_cache_destroy(screen->disk_shader_cache);
    if (winsys->destroy)
       winsys->destroy(winsys);
@@ -982,12 +977,10 @@ lp_disk_cache_find_shader(struct llvmpipe_screen *screen,
                                     sha1, &binary_size);
    if (!buffer) {
       cache->data_size = 0;
-      p_atomic_inc(&screen->num_disk_shader_cache_misses);
       return;
    }
    cache->data_size = binary_size;
    cache->data = buffer;
-   p_atomic_inc(&screen->num_disk_shader_cache_hits);
 }
 
 
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.h 
b/src/gallium/drivers/llvmpipe/lp_screen.h
index 70dc4e8531d..41e3be77a9f 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.h
+++ b/src/gallium/drivers/llvmpipe/lp_screen.h
@@ -74,8 +74,6 @@ struct llvmpipe_screen
    char renderer_string[100];
 
    struct disk_cache *disk_shader_cache;
-   unsigned num_disk_shader_cache_hits;
-   unsigned num_disk_shader_cache_misses;
 };
 
 

Reply via email to