By default, xray filters events that takes less than 5uS from its log.
In this existing test, should printf complete very quickly this will
lead to test-critical function-calls being filtered (i.e. print_parent_tid).
Given that we're not testing the filtering feature, disable it for this
test.
Details
Diff Detail
Event Timeline
Hi Dean et al,
We're continuing to see intermittent failures in the xray fork_basic_logging.cc test -- specifically the print_parent_tid call record is sometimes missing from the xray log. Xray's filtering of very fast functions might be coming into play, if printf doesn't flush stdio, so we'd like to disable it with this patch.
Good catch @jmorse
I did not realize that that some of the functions would be filtered.
LGTM -- thanks, @jmorse!
test/xray/TestCases/Posix/fork_basic_logging.cc | ||
---|---|---|
4–5 | nit: This is the deprecated way of doing this, I suggest using a the XRay Basic Mode environment variable instead. Something like: // RUN: XRAY_OPTIONS=... \ // RUN: XRAY_BASIC_OPTIONS=func_duration_threshold_us=0 \ // RUN: %run %t 2>&1 | FileCheck %s Not urgent to change though, I can do a pass later when we fully remove these from the main XRAY_OPTIONS environment variables. |
Committed in r337929
https://reviews.llvm.org/rCRT337929
I forgot the phab cross reference in the commit message, sorry.
nit: This is the deprecated way of doing this, I suggest using a the XRay Basic Mode environment variable instead. Something like:
Not urgent to change though, I can do a pass later when we fully remove these from the main XRAY_OPTIONS environment variables.