diff options
author | Qin Zhao <zhaoqin@google.com> | 2016-05-25 17:49:00 +0000 |
---|---|---|
committer | Qin Zhao <zhaoqin@google.com> | 2016-05-25 17:49:00 +0000 |
commit | a9494465352c28ce019b9e8ea8ae0eeb6ca03176 (patch) | |
tree | 9e6cf47c137a8a23f38a8c0e31d033469c1d2c4f /lib/esan/cache_frag.cpp | |
parent | 4502401cf8de82c0e2a12aa8fe6971b0d6e56121 (diff) |
[esan][cfrag] Add skeleton for cache fragmentation tool support
Summary:
Adds cache_frag.h and cache_frag.cpp for the cache fragmentation tool.
Updates test struct-simple.cpp.
Reviewers: aizatsky
Subscribers: filcab, zhaoqin, llvm-commits, eugenis, vitalybuka, kcc, bruening, kubabrecka
Differential Revision: http://reviews.llvm.org/D20538
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/esan/cache_frag.cpp')
-rw-r--r-- | lib/esan/cache_frag.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/esan/cache_frag.cpp b/lib/esan/cache_frag.cpp new file mode 100644 index 000000000..1ab8699b9 --- /dev/null +++ b/lib/esan/cache_frag.cpp @@ -0,0 +1,40 @@ +//===-- cache_frag.cpp ----------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of EfficiencySanitizer, a family of performance tuners. +// +// This file contains cache fragmentation-specific code. +//===----------------------------------------------------------------------===// + +#include "esan.h" + +namespace __esan { + +//===-- Init/exit functions -----------------------------------------------===// + +void processCacheFragCompilationUnitInit(void *Ptr) { + VPrintf(2, "in esan::%s\n", __FUNCTION__); +} + +void processCacheFragCompilationUnitExit(void *Ptr) { + VPrintf(2, "in esan::%s\n", __FUNCTION__); +} + +void initializeCacheFrag() { + VPrintf(2, "in esan::%s\n", __FUNCTION__); +} + +int finalizeCacheFrag() { + VPrintf(2, "in esan::%s\n", __FUNCTION__); + // FIXME: add the cache fragmentation final report. + Report("%s is not finished: nothing yet to report\n", SanitizerToolName); + return 0; +} + +} // namespace __esan |