diff options
Diffstat (limited to 'compiler-rt/lib/esan/cache_frag.cpp')
| -rw-r--r-- | compiler-rt/lib/esan/cache_frag.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/compiler-rt/lib/esan/cache_frag.cpp b/compiler-rt/lib/esan/cache_frag.cpp index 1ab8699b983..da168dc0c29 100644 --- a/compiler-rt/lib/esan/cache_frag.cpp +++ b/compiler-rt/lib/esan/cache_frag.cpp @@ -16,14 +16,34 @@ namespace __esan { +// This should be kept consistent with LLVM's EfficiencySanitizer StructInfo. +struct StructInfo { + const char *StructName; + u32 NumOfFields; + u64 *FieldCounters; + const char **FieldTypeNames; +}; + +// This should be kept consistent with LLVM's EfficiencySanitizer CacheFragInfo. +// The tool-specific information per compilation unit (module). +struct CacheFragInfo { + const char *UnitName; + u32 NumOfStructs; + StructInfo *Structs; +}; + //===-- Init/exit functions -----------------------------------------------===// void processCacheFragCompilationUnitInit(void *Ptr) { - VPrintf(2, "in esan::%s\n", __FUNCTION__); + CacheFragInfo *CacheFrag = (CacheFragInfo *)Ptr; + VPrintf(2, "in esan::%s: %s with %u class(es)/struct(s)\n", + __FUNCTION__, CacheFrag->UnitName, CacheFrag->NumOfStructs); } void processCacheFragCompilationUnitExit(void *Ptr) { - VPrintf(2, "in esan::%s\n", __FUNCTION__); + CacheFragInfo *CacheFrag = (CacheFragInfo *)Ptr; + VPrintf(2, "in esan::%s: %s with %u class(es)/struct(s)\n", + __FUNCTION__, CacheFrag->UnitName, CacheFrag->NumOfStructs); } void initializeCacheFrag() { |

