This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][profile] Enable profile tests for AIX
ClosedPublic

Authored by jsji on Oct 1 2021, 9:30 AM.

Details

Reviewers
Whitney
w2yehia
Group Reviewers
Restricted Project
Commits
rG666accf28331: [compiler-rt][profile] Enable profile tests for AIX
Summary

This patch enable profile test for supported options on AIX.

Diff Detail

Event Timeline

jsji created this revision.Oct 1 2021, 9:30 AM
jsji requested review of this revision.Oct 1 2021, 9:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 1 2021, 9:30 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
Herald added a subscriber: ormris. · View Herald Transcript
w2yehia added inline comments.Oct 12 2021, 7:42 AM
compiler-rt/test/profile/instrprof-set-dir-mode.c
37

I'm wondering if this can break other platforms. Is it guaranteed (by some standard) that the high order 16-bits are never used by st_mode?
If S_IFDIR has 1s in the high order 16 bits, then Mode has ones there as well; ~umask will have 1s in the high order 16 bits. So masking with 0xFFFF wud not be correct in that case.

compiler-rt/test/profile/lit.cfg.py
63

filename wud not be unique, why not stove source_path instead?

LGTM if concerns are resolved.

jsji added inline comments.Oct 12 2021, 8:43 AM
compiler-rt/test/profile/instrprof-set-dir-mode.c
37

S_IFDIR is 0040000 (octal), which is 0x4000 in hex. And yes, there are higher order 16bits are never used by st_mode other than AIX.

37

And yes, higher order 16bits are never used by st_mode other than AIX.

jsji added inline comments.Oct 12 2021, 6:11 PM
compiler-rt/test/profile/lit.cfg.py
63

We can NOT use source_path.

excludes are designed to be filename.

# Search subdirectories.
for filename in os.listdir(source_path):
      if ... filename in lc.excludes:
          continue
w2yehia accepted this revision.Oct 12 2021, 7:12 PM
This revision is now accepted and ready to land.Oct 12 2021, 7:12 PM
This revision was automatically updated to reflect the committed changes.