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 13 matching lines...) Expand all Loading... |
24 // Timer tree index type | 24 // Timer tree index type |
25 typedef std::vector<TimerTreeNode>::size_type TTindex; | 25 typedef std::vector<TimerTreeNode>::size_type TTindex; |
26 | 26 |
27 // TimerTreeNode represents an interior or leaf node in the call tree. | 27 // TimerTreeNode represents an interior or leaf node in the call tree. |
28 // It contains a list of children, a pointer to its parent, and the | 28 // It contains a list of children, a pointer to its parent, and the |
29 // timer ID for the node. It also holds the cumulative time spent at | 29 // timer ID for the node. It also holds the cumulative time spent at |
30 // this node and below. The children are always at a higher index in | 30 // this node and below. The children are always at a higher index in |
31 // the TimerTreeNode::Nodes array, and the parent is always at a lower | 31 // the TimerTreeNode::Nodes array, and the parent is always at a lower |
32 // index. | 32 // index. |
33 class TimerTreeNode { | 33 class TimerTreeNode { |
| 34 // TimerTreeNode(const TimerTreeNode &) = delete; |
| 35 TimerTreeNode &operator=(const TimerTreeNode &) = delete; |
| 36 |
34 public: | 37 public: |
35 TimerTreeNode() : Parent(0), Interior(0), Time(0), UpdateCount(0) {} | 38 TimerTreeNode() : Parent(0), Interior(0), Time(0), UpdateCount(0) {} |
36 std::vector<TTindex> Children; // indexed by TimerIdT | 39 std::vector<TTindex> Children; // indexed by TimerIdT |
37 TTindex Parent; | 40 TTindex Parent; |
38 TimerIdT Interior; | 41 TimerIdT Interior; |
39 double Time; | 42 double Time; |
40 size_t UpdateCount; | 43 size_t UpdateCount; |
41 }; | 44 }; |
42 | 45 |
43 class TimerStack { | 46 class TimerStack { |
(...skipping 27 matching lines...) Expand all Loading... |
71 std::vector<IceString> IDs; // indexed by TimerIdT | 74 std::vector<IceString> IDs; // indexed by TimerIdT |
72 std::vector<TimerTreeNode> Nodes; // indexed by TTindex | 75 std::vector<TimerTreeNode> Nodes; // indexed by TTindex |
73 std::vector<double> LeafTimes; // indexed by TimerIdT | 76 std::vector<double> LeafTimes; // indexed by TimerIdT |
74 std::vector<size_t> LeafCounts; // indexed by TimerIdT | 77 std::vector<size_t> LeafCounts; // indexed by TimerIdT |
75 TTindex StackTop; | 78 TTindex StackTop; |
76 }; | 79 }; |
77 | 80 |
78 } // end of namespace Ice | 81 } // end of namespace Ice |
79 | 82 |
80 #endif // SUBZERO_SRC_ICETIMERTREE_H | 83 #endif // SUBZERO_SRC_ICETIMERTREE_H |
OLD | NEW |