This is an archive of the discontinued LLVM Phabricator instance.

Don't filter test-critical calls out of xray data
ClosedPublic

Authored by jmorse on Jul 24 2018, 7:40 AM.

Details

Reviewers
dberris
Maknee
Summary

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.

Diff Detail

Event Timeline

jmorse created this revision.Jul 24 2018, 7:40 AM
Herald added subscribers: Restricted Project, llvm-commits. · View Herald TranscriptJul 24 2018, 7:40 AM

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.

Maknee accepted this revision.Jul 24 2018, 10:20 AM

Good catch @jmorse

I did not realize that that some of the functions would be filtered.

This revision is now accepted and ready to land.Jul 24 2018, 10:20 AM
dberris accepted this revision.Jul 24 2018, 4:09 PM

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.

jmorse closed this revision.Jul 25 2018, 8:31 AM

Committed in r337929

https://reviews.llvm.org/rCRT337929

I forgot the phab cross reference in the commit message, sorry.