[Mesa-dev] [PATCH 1/2] ddebug: print the command line to all logs (v2)

Marek Olšák maraeo at gmail.com
Mon Aug 1 21:55:51 UTC 2016


From: Marek Olšák <marek.olsak at amd.com>

for piglit with the pipelined hang detection mode

v2: rebase on top of Brian's commit
---
 src/gallium/drivers/ddebug/dd_draw.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
index 517e525..c1bfdaf 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -43,10 +43,14 @@ static FILE *
 dd_get_file_stream(struct dd_screen *dscreen, unsigned apitrace_call_number)
 {
    struct pipe_screen *screen = dscreen->screen;
+   char cmd_line[4096];
+
    FILE *f = dd_get_debug_file(dscreen->verbose);
    if (!f)
       return NULL;
 
+   if (os_get_command_line(cmd_line, sizeof(cmd_line)))
+      fprintf(f, "Command: %s\n", cmd_line);
    fprintf(f, "Driver vendor: %s\n", screen->get_vendor(screen));
    fprintf(f, "Device vendor: %s\n", screen->get_device_vendor(screen));
    fprintf(f, "Device name: %s\n\n", screen->get_name(screen));
-- 
2.7.4



More information about the mesa-dev mailing list