blob: 660b5d066a7cc753cf7e335fc3f15966fed8d68e [file] [log] [blame]
Derek Bruening88639852016-05-25 02:04:04 +00001//===-- working_set.h -------------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file is a part of EfficiencySanitizer, a family of performance tuners.
11//
12// Header for working-set-specific code.
13//===----------------------------------------------------------------------===//
14
15#ifndef WORKING_SET_H
16#define WORKING_SET_H
17
18#include "interception/interception.h"
19#include "sanitizer_common/sanitizer_internal_defs.h"
20
21namespace __esan {
22
23void initializeWorkingSet();
Derek Brueningf6f149d2016-06-14 15:15:38 +000024void initializeShadowWorkingSet();
Derek Bruening88639852016-05-25 02:04:04 +000025int finalizeWorkingSet();
26void processRangeAccessWorkingSet(uptr PC, uptr Addr, SIZE_T Size,
27 bool IsWrite);
28
Derek Bruening8e74c102016-05-31 13:21:03 +000029// Platform-dependent.
30void registerMemoryFaultHandler();
31bool processWorkingSetSignal(int SigNum, void (*Handler)(int),
32 void (**Result)(int));
33bool processWorkingSetSigaction(int SigNum, const void *Act, void *OldAct);
Derek Bruening34913f32016-07-06 21:04:48 +000034bool processWorkingSetSigprocmask(int How, void *Set, void *OldSet);
Derek Bruening8e74c102016-05-31 13:21:03 +000035
Derek Bruening88639852016-05-25 02:04:04 +000036} // namespace __esan
37
38#endif // WORKING_SET_H