]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/compiler-rt/lib/esan/working_set.h
MFV r313676: libpcap 1.8.1
[FreeBSD/FreeBSD.git] / contrib / compiler-rt / lib / esan / working_set.h
1 //===-- 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
21 namespace __esan {
22
23 void initializeWorkingSet();
24 void initializeShadowWorkingSet();
25 int finalizeWorkingSet();
26 void reportWorkingSet();
27 unsigned int getSampleCountWorkingSet();
28 void processRangeAccessWorkingSet(uptr PC, uptr Addr, SIZE_T Size,
29                                   bool IsWrite);
30
31 // Platform-dependent.
32 void registerMemoryFaultHandler();
33 bool processWorkingSetSignal(int SigNum, void (*Handler)(int),
34                              void (**Result)(int));
35 bool processWorkingSetSigaction(int SigNum, const void *Act, void *OldAct);
36 bool processWorkingSetSigprocmask(int How, void *Set, void *OldSet);
37
38 } // namespace __esan
39
40 #endif // WORKING_SET_H