This is an archive of the discontinued LLVM Phabricator instance.

Add a test case in LLVM to ensure covmap section is not created allocatable
ClosedPublic

Authored by davidxl on Feb 16 2016, 7:28 PM.

Details

Summary

The patch also introduces a X86 subdir which also exists similarly in other instrumentation test suite.

Diff Detail

Repository
rL LLVM

Event Timeline

davidxl updated this revision to Diff 48145.Feb 16 2016, 7:28 PM
davidxl retitled this revision from to Add a test case in LLVM to ensure covmap section is not created allocatable.
davidxl updated this object.
davidxl added a reviewer: vsk.
davidxl added a subscriber: llvm-commits.
vsk edited edge metadata.Feb 24 2016, 6:18 PM

Sorry for the delay.

In the future, please include pointers to any relevant commits or reviews in your diff description. It would make it easier to understand the situation.

For anyone following along, D16092 made the covmap section non-allocatable for ELF and D16118 added a test to compiler-rt.

test/Instrumentation/InstrProfiling/X86/alloc.ll
3 ↗(On Diff #48145)

Is the following a sufficient test?

@a = internal constant i32 0, section "__llvm_covmap"
; CHECK: .section __llvm_covmap,""
3 ↗(On Diff #48145)

Instead of adding a new file, would it be possible to check the assembly output of test/profile/Linux/coverage_test.cpp?

davidxl added inline comments.Feb 24 2016, 7:45 PM
test/Instrumentation/InstrProfiling/X86/alloc.ll
3 ↗(On Diff #48145)

yes the simplified version would be sufficient -- it is also more preferred than compiler-rt test as you suggested in later comment.

davidxl updated this revision to Diff 49005.Feb 24 2016, 8:04 PM
davidxl edited edge metadata.

Minimize test case according to vsk's feedback.

vsk added a comment.Feb 25 2016, 6:47 PM

Thanks, lgtm with a nit (I think the @__profn_foo can go too).

yes -- editing error :)

This revision was automatically updated to reflect the committed changes.