From a9494465352c28ce019b9e8ea8ae0eeb6ca03176 Mon Sep 17 00:00:00 2001 From: Qin Zhao Date: Wed, 25 May 2016 17:49:00 +0000 Subject: [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 --- lib/esan/cache_frag.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 lib/esan/cache_frag.cpp (limited to 'lib/esan/cache_frag.cpp') 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 -- cgit v1.2.3