Page MenuHomePhabricator

[clang][xray] Add -fxray-ignore-loops option

Authored by ianlevesque on Jan 16 2020, 1:30 PM.



XRay allows tuning by minimum function size, but also always instruments
functions with loops in them. If the minimum function size is set to a
large value the loop instrumention ends up causing most functions to be
instrumented anyway. This adds a new flag, -fxray-ignore-loops, to disable
the loop detection logic.

The LLVM change to take the new function attribute into account is in D72659

Diff Detail

Event Timeline

ianlevesque created this revision.Jan 16 2020, 1:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2020, 1:30 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

fix clang-format

Harbormaster completed remote builds in B44196: Diff 238600.
hiraditya added inline comments.Jan 17 2020, 10:14 AM

we can remove braces here.


I think we need one more test case of a function having a loop.

ianlevesque marked an inline comment as done.Jan 17 2020, 10:16 AM
ianlevesque added inline comments.

I'm not opposed but the logic to actually ignore loops has a test on D72659

hiraditya accepted this revision.Jan 17 2020, 10:21 AM

The test case is in another patch so LGTM.

This revision is now accepted and ready to land.Jan 17 2020, 10:21 AM
This revision was automatically updated to reflect the committed changes.