This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][ARM][X86] Split XRay tests for Linux/macOS
ClosedPublic

Authored by ilammy on Mar 3 2023, 7:24 PM.

Details

Summary

XRay instrumentation works for macOS running on Apple Silicon, but
codegen is untested there. I'm going to make changes affecting this
target, get the XRay tests running on AArch64.

Data sections are going to become slightly different on x86_64 soon.
I do want the tests to be specific about symbol names, so instead of
having test check the common step, bifurcate tests a bit and check
the full symbol names.

As for ARM, XRay is not really supported on iOS at the moment, though
ARM is also really used there with modern phones. Nevertheless, codegen
tests exist and the output is going to change a little, make it easier
to write the special case for iOS.

Diff Detail

Event Timeline

ilammy created this revision.Mar 3 2023, 7:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2023, 7:24 PM
ilammy requested review of this revision.Mar 3 2023, 7:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2023, 7:24 PM
ilammy updated this revision to Diff 502423.Mar 5 2023, 3:55 AM
ilammy retitled this revision from [AArch64] Run XRay tests for macOS to [AArch64][ARM][X86] Split XRay tests for Linux/macOS.
ilammy edited the summary of this revision. (Show Details)

You know what, let's update all architectures at once.

I'm new to LLVM contribution, I don't know how fine-grained patches should be. I prepped them as individual commits, but this is probably not appropriate in this case.

MaskRay accepted this revision.Mar 5 2023, 6:38 PM
MaskRay added inline comments.
llvm/test/CodeGen/AArch64/xray-attribute-instrumentation.ll
31

For labels, prefer :

This applies all files you are going to update.

This revision is now accepted and ready to land.Mar 5 2023, 6:38 PM
ilammy updated this revision to Diff 502580.Mar 6 2023, 4:22 AM

@MaskRay:

For labels, prefer :

This applies all files you are going to update.

Done. Updated all new checks to consistently use colons after labels.

Also, updated checks for section names (xray_instr_map) so that they check for .section there as well. Slightly differently for Mach-O.

MaskRay added inline comments.Mar 6 2023, 2:23 PM
llvm/test/CodeGen/AArch64/xray-attribute-instrumentation.ll
30–40

Ensure that you include the flags and type parts in .section xray_instr_map,"....",....

ilammy updated this revision to Diff 503340.Mar 8 2023, 6:00 AM

@MaskRay:

Ensure that you include the flags and type parts in .section xray_instr_map,"....",....

Now quoting the exact section attributes, with {{$}} at the end to ensure that no unexpected stuff is appended later.

ilammy updated this revision to Diff 530282.Jun 11 2023, 12:26 AM
  • Rebasing on newer LLVM trunk
  • No substantial changes since previous revision

I don't have push access. Could someone land this for me please?

ilammy marked 2 inline comments as done.Jun 11 2023, 12:29 AM
This revision was landed with ongoing or failed builds.Jun 11 2023, 12:53 PM
This revision was automatically updated to reflect the committed changes.
MaskRay added inline comments.Jun 20 2023, 11:01 PM
llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll
37 ↗(On Diff #530327)

I find that these suffixes (original issue) made updating difficult. I landed some fixes (e.g. 49b61ead47c111171c324f94e849534798f69dc2) to make them less sensitive.