Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: src/IceTimerTree.h

Issue 640713003: Subzero: Improve the output with the --timing-focus=xxx option. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 80-col Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceTimerTree.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 public: 46 public:
47 enum TimerTag { 47 enum TimerTag {
48 #define X(tag) TT_##tag, 48 #define X(tag) TT_##tag,
49 TIMERTREE_TABLE 49 TIMERTREE_TABLE
50 #undef X 50 #undef X
51 TT__num 51 TT__num
52 }; 52 };
53 TimerStack(const IceString &Name); 53 TimerStack(const IceString &Name);
54 TimerIdT getTimerID(const IceString &Name); 54 TimerIdT getTimerID(const IceString &Name);
55 void setName(const IceString &NewName) { Name = NewName; }
55 void push(TimerIdT ID); 56 void push(TimerIdT ID);
56 void pop(TimerIdT ID); 57 void pop(TimerIdT ID);
58 void reset();
57 void dump(Ostream &Str, bool DumpCumulative); 59 void dump(Ostream &Str, bool DumpCumulative);
58 60
59 private: 61 private:
60 void update(); 62 void update();
61 static double timestamp(); 63 static double timestamp();
62 const IceString Name; 64 IceString Name;
63 const double FirstTimestamp; 65 double FirstTimestamp;
64 double LastTimestamp; 66 double LastTimestamp;
65 uint64_t StateChangeCount; 67 uint64_t StateChangeCount;
66 // IDsIndex maps a symbolic timer name to its integer ID. 68 // IDsIndex maps a symbolic timer name to its integer ID.
67 std::map<IceString, TimerIdT> IDsIndex; 69 std::map<IceString, TimerIdT> IDsIndex;
68 std::vector<IceString> IDs; // indexed by TimerIdT 70 std::vector<IceString> IDs; // indexed by TimerIdT
69 std::vector<TimerTreeNode> Nodes; // indexed by TTindex 71 std::vector<TimerTreeNode> Nodes; // indexed by TTindex
70 std::vector<double> LeafTimes; // indexed by TimerIdT 72 std::vector<double> LeafTimes; // indexed by TimerIdT
71 TTindex StackTop; 73 TTindex StackTop;
72 }; 74 };
73 75
74 } // end of namespace Ice 76 } // end of namespace Ice
75 77
76 #endif // SUBZERO_SRC_ICETIMERTREE_H 78 #endif // SUBZERO_SRC_ICETIMERTREE_H
OLDNEW
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceTimerTree.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698