OLD | NEW |
---|---|
(Empty) | |
1 //===--- subzero/src/LinuxMallocProfiling.h - malloc/new tracing ---------===// | |
2 // | |
3 // The Subzero Code Generator | |
4 // | |
5 // This file is distributed under the University of Illinois Open Source | |
6 // License. See LICENSE.TXT for details. | |
7 // | |
8 //===----------------------------------------------------------------------===// | |
9 /// | |
10 /// \file | |
11 /// \brief malloc/new/...caller tracing. | |
12 /// | |
13 //===----------------------------------------------------------------------===// | |
John
2016/03/15 15:19:06
you're missing the
#ifndef LINUXMALLOCPROFILING_H
sehr
2016/03/17 16:47:14
Done.
| |
14 | |
15 #include "IceDefs.h" | |
16 #include "IceTypes.h" | |
17 | |
18 #include <iostream> | |
19 | |
20 namespace Ice { | |
21 | |
22 class LinuxMallocProfiling { | |
23 public: | |
Jim Stichnoth
2016/03/15 15:36:50
This doesn't look like normal clang-format indenta
sehr
2016/03/17 16:47:14
Done.
| |
24 explicit LinuxMallocProfiling(size_t NumThreads) { | |
John
2016/03/15 15:19:06
can you move the definitions to the .cpp file so t
sehr
2016/03/17 16:47:14
Done.
| |
25 if (NumThreads != 0) { | |
26 #ifdef ALLOW_LINUX_MALLOC_PROFILE | |
27 std::cout << "NOTE: Malloc profiling is not thread safe. " | |
28 << "Use --threads=0 to enable.\n"; | |
29 #endif // ALLOW_LINUX_MALLOC_PROFILE | |
30 return; | |
31 } | |
32 start(); | |
33 } | |
34 ~LinuxMallocProfiling() { | |
35 end(); | |
36 } | |
37 | |
38 private: | |
39 LinuxMallocProfiling(const LinuxMallocProfiling&) = delete; | |
John
2016/03/15 15:19:06
I honestly believe this is the proper place for de
sehr
2016/03/17 16:47:14
Done.
| |
40 LinuxMallocProfiling &operator=(const LinuxMallocProfiling&) = delete; | |
41 static void start(); | |
John
2016/03/15 15:19:06
if you move the ctor/dtor implementation to the .c
sehr
2016/03/17 16:47:14
Done.
| |
42 static void end(); | |
43 }; | |
44 | |
45 } // end of namespace Ice | |
OLD | NEW |