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

Side by Side Diff: src/counters.cc

Issue 420753002: Added histogram to track distribution of requested idle notifications. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/counters.h ('k') | src/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/platform/platform.h" 7 #include "src/base/platform/platform.h"
8 #include "src/counters.h" 8 #include "src/counters.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (Enabled()) { 48 if (Enabled()) {
49 // Compute the delta between start and stop, in milliseconds. 49 // Compute the delta between start and stop, in milliseconds.
50 AddSample(static_cast<int>(timer_.Elapsed().InMilliseconds())); 50 AddSample(static_cast<int>(timer_.Elapsed().InMilliseconds()));
51 timer_.Stop(); 51 timer_.Stop();
52 } 52 }
53 isolate()->event_logger()(name(), Logger::END); 53 isolate()->event_logger()(name(), Logger::END);
54 } 54 }
55 55
56 56
57 Counters::Counters(Isolate* isolate) { 57 Counters::Counters(Isolate* isolate) {
58 #define HR(name, caption) name##_ = Histogram(#caption, 0, 1000, 1001, isolate);
rmcilroy 2014/07/25 16:09:28 optional suggestion - if you want this to be gener
rmcilroy 2014/07/25 16:09:28 nit - newline after ")" like those below.
jochen (gone - plz use gerrit) 2014/07/28 08:44:43 why cap it at 1000? We might want to allow for lar
Hannes Payer (out of office) 2014/07/28 09:01:13 git cl format moved it up :-/ I will try to force
Hannes Payer (out of office) 2014/07/28 09:01:13 Good idea, done.
Hannes Payer (out of office) 2014/07/28 09:02:40 Yeah, I thought so as well. I increased the max, b
59 HISTOGRAM_RANGE_LIST(HR)
60 #undef HR
61
58 #define HT(name, caption) \ 62 #define HT(name, caption) \
59 name##_ = HistogramTimer(#caption, 0, 10000, 50, isolate); 63 name##_ = HistogramTimer(#caption, 0, 10000, 50, isolate);
60 HISTOGRAM_TIMER_LIST(HT) 64 HISTOGRAM_TIMER_LIST(HT)
61 #undef HT 65 #undef HT
62 66
63 #define HP(name, caption) \ 67 #define HP(name, caption) \
64 name##_ = Histogram(#caption, 0, 101, 100, isolate); 68 name##_ = Histogram(#caption, 0, 101, 100, isolate);
65 HISTOGRAM_PERCENTAGE_LIST(HP) 69 HISTOGRAM_PERCENTAGE_LIST(HP)
66 #undef HP 70 #undef HP
67 71
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 139
136 #define SC(name) \ 140 #define SC(name) \
137 count_of_CODE_AGE_##name##_.Reset(); \ 141 count_of_CODE_AGE_##name##_.Reset(); \
138 size_of_CODE_AGE_##name##_.Reset(); 142 size_of_CODE_AGE_##name##_.Reset();
139 CODE_AGE_LIST_COMPLETE(SC) 143 CODE_AGE_LIST_COMPLETE(SC)
140 #undef SC 144 #undef SC
141 } 145 }
142 146
143 147
144 void Counters::ResetHistograms() { 148 void Counters::ResetHistograms() {
149 #define HR(name, caption) name##_.Reset();
150 HISTOGRAM_MEMORY_LIST(HR)
jochen (gone - plz use gerrit) 2014/07/28 08:44:43 HISTOGRAM_RANGE_LIST?
Hannes Payer (out of office) 2014/07/28 09:02:40 Already fixed.
151 #undef HR
152
145 #define HT(name, caption) name##_.Reset(); 153 #define HT(name, caption) name##_.Reset();
146 HISTOGRAM_TIMER_LIST(HT) 154 HISTOGRAM_TIMER_LIST(HT)
147 #undef HT 155 #undef HT
148 156
149 #define HP(name, caption) name##_.Reset(); 157 #define HP(name, caption) name##_.Reset();
150 HISTOGRAM_PERCENTAGE_LIST(HP) 158 HISTOGRAM_PERCENTAGE_LIST(HP)
151 #undef HP 159 #undef HP
152 160
153 #define HM(name, caption) name##_.Reset(); 161 #define HM(name, caption) name##_.Reset();
154 HISTOGRAM_MEMORY_LIST(HM) 162 HISTOGRAM_MEMORY_LIST(HM)
155 #undef HM 163 #undef HM
156 } 164 }
157 165
158 } } // namespace v8::internal 166 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/counters.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698