This is an archive of the discontinued LLVM Phabricator instance.

[esan|cfrag] Disable load/store instrumentation for cfrag
ClosedPublic

Authored by zhaoqin on Jun 7 2016, 8:51 AM.

Details

Summary

Adds ClInstrumentFastpath option to control fastpath instrumentation.

Avoids the load/store instrumentation for the cache fragmentation tool.

Renames cache_frag_basic.ll to working_set_slow.ll for slowpath
instrumentation test.

Adds the __esan_init check in struct_field_count_basic.ll.

Diff Detail

Event Timeline

zhaoqin updated this revision to Diff 59896.Jun 7 2016, 8:51 AM
zhaoqin retitled this revision from to [esan|cfrag] Disable load/store/memintrinsic instrumentation.
zhaoqin updated this object.
zhaoqin added a reviewer: aizatsky.
zhaoqin added subscribers: vitalybuka, zhaoqin, kcc and 3 others.
aizatsky requested changes to this revision.Jun 7 2016, 1:53 PM
aizatsky edited edge metadata.
aizatsky added inline comments.
lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
129

Make this part of Options. Do not change flag values please.

This revision now requires changes to proceed.Jun 7 2016, 1:53 PM
zhaoqin retitled this revision from [esan|cfrag] Disable load/store/memintrinsic instrumentation to [esan|cfrag] Disable load/store/memintrinsic instrumentation for cfrag.Jun 8 2016, 10:21 AM
zhaoqin updated this object.
zhaoqin edited edge metadata.
zhaoqin marked an inline comment as done.
zhaoqin updated this revision to Diff 60064.Jun 8 2016, 10:22 AM
zhaoqin edited edge metadata.
zhaoqin updated this object.

Adds instrumentation control in Options

bruening added inline comments.Jun 8 2016, 10:29 AM
include/llvm/Transforms/Instrumentation.h
131

This doesn't make sense to me: why expose these here ina public header when they are internal to the instrumentation pass? Having them just be opt options as they were originally seems the better way to go. We want cl::opt options whose defaults vary according to the tool selected. What is needed is for cl::opt to provide a flag indicating whether the option was specified by the user or not, or else to provide more dynamic defaults, or to go with the original CL.

zhaoqin added inline comments.Jun 8 2016, 11:24 AM
include/llvm/Transforms/Instrumentation.h
131

Would an internal option struct works?

zhaoqin retitled this revision from [esan|cfrag] Disable load/store/memintrinsic instrumentation for cfrag to [esan|cfrag] Disable load/store instrumentation for cfrag.Jun 9 2016, 8:19 AM
zhaoqin updated this object.
zhaoqin edited edge metadata.
zhaoqin updated this revision to Diff 60182.Jun 9 2016, 8:39 AM
zhaoqin updated this object.

revert changes on options.

Since I am not sure how to change Cl options to meet both reviews. I implement a different way to skip load/store instrumentation without changing options.
PTAL.

aizatsky accepted this revision.Jun 9 2016, 3:24 PM
aizatsky edited edge metadata.
This revision is now accepted and ready to land.Jun 9 2016, 3:24 PM
This revision was automatically updated to reflect the committed changes.