OLD | NEW |
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 #include "src/log-inl.h" | 10 #include "src/log-inl.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 #define AHT(name, caption) \ | 72 #define AHT(name, caption) \ |
73 name##_ = AggregatableHistogramTimer(#caption, 0, 10000000, 50, isolate); | 73 name##_ = AggregatableHistogramTimer(#caption, 0, 10000000, 50, isolate); |
74 AGGREGATABLE_HISTOGRAM_TIMER_LIST(AHT) | 74 AGGREGATABLE_HISTOGRAM_TIMER_LIST(AHT) |
75 #undef AHT | 75 #undef AHT |
76 | 76 |
77 #define HP(name, caption) \ | 77 #define HP(name, caption) \ |
78 name##_ = Histogram(#caption, 0, 101, 100, isolate); | 78 name##_ = Histogram(#caption, 0, 101, 100, isolate); |
79 HISTOGRAM_PERCENTAGE_LIST(HP) | 79 HISTOGRAM_PERCENTAGE_LIST(HP) |
80 #undef HP | 80 #undef HP |
81 | 81 |
| 82 |
| 83 // Exponential histogram assigns bucket limits to points |
| 84 // p[1], p[2], ... p[n] such that p[i+1] / p[i] = constant. |
| 85 // The constant factor is equal to the n-th root of (high / low), |
| 86 // where the n is the number of buckets, the low is the lower limit, |
| 87 // the high is the upper limit. |
| 88 // For n = 50, low = 1000, high = 500000: the factor = 1.13. |
82 #define HM(name, caption) \ | 89 #define HM(name, caption) \ |
83 name##_ = Histogram(#caption, 1000, 500000, 50, isolate); | 90 name##_ = Histogram(#caption, 1000, 500000, 50, isolate); |
| 91 HISTOGRAM_LEGACY_MEMORY_LIST(HM) |
| 92 #undef HM |
| 93 // For n = 100, low = 4000, high = 2000000: the factor = 1.06. |
| 94 #define HM(name, caption) \ |
| 95 name##_ = Histogram(#caption, 4000, 2000000, 100, isolate); |
| 96 HISTOGRAM_MEMORY_LIST(HM) |
| 97 #undef HM |
| 98 |
| 99 #define HM(name, caption) \ |
| 100 aggregated_##name##_ = AggregatedMemoryHistogram<Histogram>(&name##_); |
84 HISTOGRAM_MEMORY_LIST(HM) | 101 HISTOGRAM_MEMORY_LIST(HM) |
85 #undef HM | 102 #undef HM |
86 | 103 |
87 #define SC(name, caption) \ | 104 #define SC(name, caption) \ |
88 name##_ = StatsCounter(isolate, "c:" #caption); | 105 name##_ = StatsCounter(isolate, "c:" #caption); |
89 | 106 |
90 STATS_COUNTER_LIST_1(SC) | 107 STATS_COUNTER_LIST_1(SC) |
91 STATS_COUNTER_LIST_2(SC) | 108 STATS_COUNTER_LIST_2(SC) |
92 #undef SC | 109 #undef SC |
93 | 110 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 183 |
167 #define AHT(name, caption) name##_.Reset(); | 184 #define AHT(name, caption) name##_.Reset(); |
168 AGGREGATABLE_HISTOGRAM_TIMER_LIST(AHT) | 185 AGGREGATABLE_HISTOGRAM_TIMER_LIST(AHT) |
169 #undef AHT | 186 #undef AHT |
170 | 187 |
171 #define HP(name, caption) name##_.Reset(); | 188 #define HP(name, caption) name##_.Reset(); |
172 HISTOGRAM_PERCENTAGE_LIST(HP) | 189 HISTOGRAM_PERCENTAGE_LIST(HP) |
173 #undef HP | 190 #undef HP |
174 | 191 |
175 #define HM(name, caption) name##_.Reset(); | 192 #define HM(name, caption) name##_.Reset(); |
176 HISTOGRAM_MEMORY_LIST(HM) | 193 HISTOGRAM_LEGACY_MEMORY_LIST(HM) |
177 #undef HM | 194 #undef HM |
178 } | 195 } |
179 | 196 |
180 } } // namespace v8::internal | 197 } } // namespace v8::internal |
OLD | NEW |