summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/esan/cache_frag.cpp
diff options
context:
space:
mode:
authorQin Zhao <zhaoqin@google.com>2016-05-25 17:49:00 +0000
committerQin Zhao <zhaoqin@google.com>2016-05-25 17:49:00 +0000
commit7e4933f430c398685d3d11373b612435622ed226 (patch)
treed3a5143d94010ca887a54298753fac96641c362e /compiler-rt/lib/esan/cache_frag.cpp
parent4578d6a9e10caccafe5dd16cabf4e10e11854e71 (diff)
downloadbcm5719-llvm-7e4933f430c398685d3d11373b612435622ed226.tar.gz
bcm5719-llvm-7e4933f430c398685d3d11373b612435622ed226.zip
[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 llvm-svn: 270737
Diffstat (limited to 'compiler-rt/lib/esan/cache_frag.cpp')
-rw-r--r--compiler-rt/lib/esan/cache_frag.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/compiler-rt/lib/esan/cache_frag.cpp b/compiler-rt/lib/esan/cache_frag.cpp
new file mode 100644
index 00000000000..1ab8699b983
--- /dev/null
+++ b/compiler-rt/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
OpenPOWER on IntegriCloud