OLD | NEW |
1 //===- subzero/src/IceTimerTree.h - Pass timer defs -------------*- C++ -*-===// | 1 //===- subzero/src/IceTimerTree.h - Pass timer defs -------------*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file declares the TimerTree class, which allows flat and | 10 // This file declares the TimerTree class, which allows flat and |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 public: | 44 public: |
45 TimerStack(const IceString &TopLevelName); | 45 TimerStack(const IceString &TopLevelName); |
46 static TimerIdT getTimerID(const IceString &Name); | 46 static TimerIdT getTimerID(const IceString &Name); |
47 void push(TimerIdT ID); | 47 void push(TimerIdT ID); |
48 void pop(TimerIdT ID); | 48 void pop(TimerIdT ID); |
49 void dump(Ostream &Str); | 49 void dump(Ostream &Str); |
50 | 50 |
51 private: | 51 private: |
52 void update(); | 52 void update(); |
53 static double timestamp() { | 53 static double timestamp(); |
54 // TODO: Implement in terms of std::chrono for C++11. | |
55 return llvm::TimeRecord::getCurrentTime(false).getWallTime(); | |
56 } | |
57 const double FirstTimestamp; | 54 const double FirstTimestamp; |
58 double LastTimestamp; | 55 double LastTimestamp; |
59 uint64_t StateChangeCount; | 56 uint64_t StateChangeCount; |
60 static std::vector<IceString> IDs; // indexed by TimerIdT | 57 static std::vector<IceString> IDs; // indexed by TimerIdT |
61 std::vector<TimerTreeNode> Nodes; // indexed by TTindex | 58 std::vector<TimerTreeNode> Nodes; // indexed by TTindex |
62 std::vector<double> LeafTimes; // indexed by TimerIdT | 59 std::vector<double> LeafTimes; // indexed by TimerIdT |
63 TTindex StackTop; | 60 TTindex StackTop; |
64 }; | 61 }; |
65 | 62 |
66 } // end of namespace Ice | 63 } // end of namespace Ice |
67 | 64 |
68 #endif // SUBZERO_SRC_ICETIMERTREE_H | 65 #endif // SUBZERO_SRC_ICETIMERTREE_H |
OLD | NEW |