aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/intel/tools/intel_dump_gpu.c2
-rwxr-xr-xsrc/intel/tools/intel_dump_gpu.in11
2 files changed, 9 insertions, 4 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")) {
diff --git a/src/intel/tools/intel_dump_gpu.in b/src/intel/tools/intel_dump_gpu.in
index 9eea37189db..0454cff25da 100755
--- a/src/intel/tools/intel_dump_gpu.in
+++ b/src/intel/tools/intel_dump_gpu.in
@@ -82,7 +82,12 @@ done
[ -z $file ] && add_arg "file=intel.aub"
+tmp_file=`mktemp`
+echo -e $args > $tmp_file
+
LD_PRELOAD="@install_libexecdir@/libintel_dump_gpu.so${LD_PPRELOAD:+:$LD_PRELOAD}" \
- exec -- "$@" 3<<EOF
-`echo -e $args`
-EOF
+ INTEL_DUMP_GPU_CONFIG=$tmp_file \
+ $@
+ret=$?
+rm $tmp_file
+exit $ret