xref: /aosp_15_r20/external/swiftshader/third_party/subzero/src/LinuxMallocProfiling.h (revision 03ce13f70fcc45d86ee91b7ee4cab1936a95046e)
1*03ce13f7SAndroid Build Coastguard Worker //===--- subzero/src/LinuxMallocProfiling.h - malloc/new tracing  ---------===//
2*03ce13f7SAndroid Build Coastguard Worker //
3*03ce13f7SAndroid Build Coastguard Worker //                        The Subzero Code Generator
4*03ce13f7SAndroid Build Coastguard Worker //
5*03ce13f7SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source
6*03ce13f7SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details.
7*03ce13f7SAndroid Build Coastguard Worker //
8*03ce13f7SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
9*03ce13f7SAndroid Build Coastguard Worker ///
10*03ce13f7SAndroid Build Coastguard Worker /// \file
11*03ce13f7SAndroid Build Coastguard Worker /// \brief malloc/new/...caller tracing.
12*03ce13f7SAndroid Build Coastguard Worker ///
13*03ce13f7SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
14*03ce13f7SAndroid Build Coastguard Worker 
15*03ce13f7SAndroid Build Coastguard Worker #ifndef SUBZERO_SRC_LINUXMALLOCPROFILING_H
16*03ce13f7SAndroid Build Coastguard Worker #define SUBZERO_SRC_LINUXMALLOCPROFILING_H
17*03ce13f7SAndroid Build Coastguard Worker 
18*03ce13f7SAndroid Build Coastguard Worker #include "IceDefs.h"
19*03ce13f7SAndroid Build Coastguard Worker 
20*03ce13f7SAndroid Build Coastguard Worker namespace Ice {
21*03ce13f7SAndroid Build Coastguard Worker 
22*03ce13f7SAndroid Build Coastguard Worker class LinuxMallocProfiling {
23*03ce13f7SAndroid Build Coastguard Worker private:
24*03ce13f7SAndroid Build Coastguard Worker   LinuxMallocProfiling(const LinuxMallocProfiling &) = delete;
25*03ce13f7SAndroid Build Coastguard Worker   LinuxMallocProfiling &operator=(const LinuxMallocProfiling &) = delete;
26*03ce13f7SAndroid Build Coastguard Worker 
27*03ce13f7SAndroid Build Coastguard Worker #ifdef ALLOW_LINUX_MALLOC_PROFILE
28*03ce13f7SAndroid Build Coastguard Worker   Ostream *Ls;
29*03ce13f7SAndroid Build Coastguard Worker #endif // ALLOW_LINUX_MALLOC_PROFILE
30*03ce13f7SAndroid Build Coastguard Worker 
31*03ce13f7SAndroid Build Coastguard Worker public:
32*03ce13f7SAndroid Build Coastguard Worker   LinuxMallocProfiling(size_t NumThreads, Ostream *Ls);
33*03ce13f7SAndroid Build Coastguard Worker   ~LinuxMallocProfiling();
34*03ce13f7SAndroid Build Coastguard Worker };
35*03ce13f7SAndroid Build Coastguard Worker 
36*03ce13f7SAndroid Build Coastguard Worker } // end of namespace Ice
37*03ce13f7SAndroid Build Coastguard Worker 
38*03ce13f7SAndroid Build Coastguard Worker #endif // SUBZERO_SRC_LINUXMALLOCPROFILING_H
39