aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/tools/intel_dump_gpu.c
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-07-20 11:18:18 +0100
committerLionel Landwerlin <[email protected]>2018-07-20 17:36:37 +0100
commit2a9069eb97f636b427430ffc49813dfbfa96d56f (patch)
tree6939ad58a513f0b153272ff7be11652bd1adf079 /src/intel/tools/intel_dump_gpu.c
parent1efc9094e0e6a8ec3be9fd146fc781b1a48c1760 (diff)
intel: tools: dump: make dump tool reliable under gdb
The problem with passing the configuration of the dump lib through a file descriptor is that it can be read only once. But under gdb you might want to rerun your program multiple times. This change hands the configuration through a temporary file that is deleted once the command line passes to intel_dump_gpu has exited. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
Diffstat (limited to 'src/intel/tools/intel_dump_gpu.c')
-rw-r--r--src/intel/tools/intel_dump_gpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/tools/intel_dump_gpu.c b/src/intel/tools/intel_dump_gpu.c
index 6ce7d452afb..1abe54147cf 100644
--- a/src/intel/tools/intel_dump_gpu.c
+++ b/src/intel/tools/intel_dump_gpu.c
@@ -349,7 +349,7 @@ maybe_init(void)
initialized = true;
- config = fdopen(3, "r");
+ config = fopen(getenv("INTEL_DUMP_GPU_CONFIG"), "r");
while (fscanf(config, "%m[^=]=%m[^\n]\n", &key, &value) != EOF) {
if (!strcmp(key, "verbose")) {
if (!strcmp(value, "1")) {