[Mesa-dev] [PATCH] svga: add SVGA_NO_LOGGING env var

Neha Bhende bhenden at vmware.com
Wed May 1 18:19:58 UTC 2019


Looks reasonable to me.

Reviewed-by: Neha Bhende <bhenden at vmware.com>

Regards,
Neha

________________________________________
From: mesa-dev <mesa-dev-bounces at lists.freedesktop.org> on behalf of Brian Paul <brianp at vmware.com>
Sent: Wednesday, May 1, 2019 9:48 AM
To: mesa-dev at lists.freedesktop.org
Cc: mesa-stable at lists.freedesktop.org; Neha Bhende; Deepak Singh Rawat
Subject: [Mesa-dev] [PATCH] svga: add SVGA_NO_LOGGING env var

valgrind crashes when we try to initialize host logging.  This
env var can be used to disable logging.

Cc: mesa-stable at lists.freedesktop.org
---
 docs/envvars.html                      | 3 +++
 src/gallium/drivers/svga/svga_screen.c | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/docs/envvars.html b/docs/envvars.html
index c9733e6..43d3a6c 100644
--- a/docs/envvars.html
+++ b/docs/envvars.html
@@ -338,6 +338,9 @@ See src/mesa/state_tracker/st_debug.c for other options.
 for details.
 <li>SVGA_EXTRA_LOGGING - if set, enables extra logging to the vmware.log file,
 such as the OpenGL program's name and command line arguments.
+<li>SVGA_NO_LOGGING - if set, disables logging to the vmware.log file.
+This is useful when using Valgrind because it otherwise crashes when
+initializing the host log feature.
 <li>See the driver code for other, lesser-used variables.
 </ul>

diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 6cb5a14..8158950 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -1134,7 +1134,9 @@ svga_screen_create(struct svga_winsys_screen *sws)

    svga_screen_cache_init(svgascreen);

-   init_logging(screen);
+   if (debug_get_bool_option("SVGA_NO_LOGGING", FALSE) == FALSE) {
+      init_logging(screen);
+   }

    return screen;
 error2:
--
1.8.5.6

_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-dev&data=02%7C01%7Cbhenden%40vmware.com%7Cfd9f3e778e56480cc64708d6ce54d0f9%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C1%7C636923261021926972&sdata=c3YZTbcPzMc5HYTO%2FB%2FGWrztCwBXhKBnB21XUfLg0n0%3D&reserved=0


More information about the mesa-dev mailing list