This is an archive of the discontinued LLVM Phabricator instance.

[esan|cfrag] Add the skeleton to handle the cfrag argument
ClosedPublic

Authored by zhaoqin on May 23 2016, 2:49 PM.

Details

Summary

Adds the struct declaration for the cache-fragmentation tool variable
passed to the runtime library.

Updates test struct-simple.cpp.

Diff Detail

Event Timeline

zhaoqin updated this revision to Diff 58155.May 23 2016, 2:49 PM
zhaoqin retitled this revision from to [esan|cfrag] Adds struct CacheFragType.
zhaoqin updated this object.
zhaoqin added a reviewer: aizatsky.
zhaoqin added subscribers: zhaoqin, llvm-commits, eugenis and 4 others.

[esan|cfrag] Adds struct CacheFragType

nit: title should be "Add" not "Adds" for consistency

zhaoqin updated this revision to Diff 58164.May 23 2016, 3:26 PM

Update commit msg

zhaoqin updated this revision to Diff 58250.May 24 2016, 9:37 AM

Rename CacheFragType to CacheFragTy for consistency.

zhaoqin retitled this revision from [esan|cfrag] Adds struct CacheFragType to [esan|cfrag] Handle the cfrag variable passed to the runtime.May 24 2016, 9:38 AM
aizatsky added inline comments.May 24 2016, 2:18 PM
lib/esan/cache_frag.cpp
21

Again, the same question as for D20541 - is there a reason to have this specialized rather than shared for all tools?

Tool & UnitName seem to be generic enough.

aizatsky accepted this revision.May 24 2016, 3:04 PM
aizatsky edited edge metadata.
aizatsky added inline comments.
lib/esan/cache_frag.cpp
21

I saw following CLs and I've got my answers: different tools will have different structures.

This revision is now accepted and ready to land.May 24 2016, 3:04 PM
filcab added a subscriber: filcab.May 25 2016, 7:09 AM
filcab added inline comments.
lib/esan/cache_frag.cpp
22

Same as D20541: No need passing ToolType in the struct, since we're passing it to __esan_init

30

Same as above. If we get here and this test fails, then we should have failed on an __esan_init call.

zhaoqin updated this revision to Diff 58474.May 25 2016, 12:47 PM
zhaoqin edited edge metadata.

Rebase to ToT.
Remove ToolType.

zhaoqin updated this object.May 27 2016, 8:51 AM
zhaoqin updated this revision to Diff 58796.May 27 2016, 8:52 AM
zhaoqin updated this object.

Add ToolInfo and CacheFragInfo

If we have a common ToolInfo struct, maybe we can switch __esan_init to
take it instead of a void* so we can do without a few of the casts.

LGTM, anyway.

Thank you,

Filipe

zhaoqin retitled this revision from [esan|cfrag] Handle the cfrag variable passed to the runtime to [esan|cfrag] Add the skeleton to handle the cfrag argument.May 27 2016, 3:52 PM
zhaoqin updated this object.
zhaoqin added a reviewer: bruening.
zhaoqin updated this revision to Diff 58853.May 27 2016, 3:53 PM
zhaoqin updated this object.

Remove ToolInfo

This revision was automatically updated to reflect the committed changes.