[PATCH] D52638: [XRay] Fix fdr-thread-order.cc when current directory contains fdr-thread-order.cc

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 27 19:12:37 PDT 2018


dberris added a comment.

Thanks for the patch -- some questions and suggestions below.



================
Comment at: test/xray/TestCases/Posix/fdr-thread-order.cc:2
+// RUN: rm -rf %t && mkdir %t
+// RUN: %clangxx_xray -g -std=c++11 %s -o %t.exe
+// RUN: XRAY_OPTIONS="patch_premain=false \
----------------
I'm not a fan of the `.exe` extension here -- consider `-bin` instead?


================
Comment at: test/xray/TestCases/Posix/fdr-thread-order.cc:4-5
+// RUN: XRAY_OPTIONS="patch_premain=false \
+// RUN:    xray_logfile_base=%t/ xray_fdr_log=true verbosity=1" \
+// RUN:    XRAY_FDR_OPTIONS=func_duration_threshold_us=0 %run %t.exe 2>&1 | \
 // RUN:    FileCheck %s
----------------
While we're here, can we change `xray_fdr_log=true` to `xray_mode=xray-fdr` in the `XRAY_OPTIONS` environment variable?


================
Comment at: test/xray/TestCases/Posix/fdr-thread-order.cc:12
-// RUN:    FileCheck %s --check-prefix TRACE
-// RUN: rm fdr-thread-order.*
 // FIXME: Make llvm-xray work on non-x86_64 as well.
----------------
Unfortunately, doing this makes it really easy to clog up the filesystem with log files upon failure (which I learned the hard way while working on these). The suggestion has been to re-create the sequence by hand if we want to debug, rather than to keep them lying around when the tests fail.

Thoughts?


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D52638





More information about the llvm-commits mailing list