| Index: src/counters.cc
|
| diff --git a/src/counters.cc b/src/counters.cc
|
| index cdadcacfec9de9744e5a505b0767607afc8532ff..eb1b4c27f00c2c04dbc6fd2a2fbde809ce645543 100644
|
| --- a/src/counters.cc
|
| +++ b/src/counters.cc
|
| @@ -53,4 +53,74 @@ void HistogramTimer::Stop() {
|
| isolate()->event_logger()(name(), Logger::END);
|
| }
|
|
|
| +
|
| +Counters::Counters(Isolate* isolate) {
|
| +#define HT(name, caption) \
|
| + name##_ = HistogramTimer(#caption, 0, 10000, 50, isolate);
|
| + HISTOGRAM_TIMER_LIST(HT)
|
| +#undef HT
|
| +
|
| +#define HP(name, caption) \
|
| + name##_ = Histogram(#caption, 0, 101, 100, isolate);
|
| + HISTOGRAM_PERCENTAGE_LIST(HP)
|
| +#undef HP
|
| +
|
| +#define HM(name, caption) \
|
| + name##_ = Histogram(#caption, 1000, 500000, 50, isolate);
|
| + HISTOGRAM_MEMORY_LIST(HM)
|
| +#undef HM
|
| +
|
| +#define SC(name, caption) \
|
| + name##_ = StatsCounter(isolate, "c:" #caption);
|
| +
|
| + STATS_COUNTER_LIST_1(SC)
|
| + STATS_COUNTER_LIST_2(SC)
|
| +#undef SC
|
| +
|
| +#define SC(name) \
|
| + count_of_##name##_ = StatsCounter(isolate, "c:" "V8.CountOf_" #name); \
|
| + size_of_##name##_ = StatsCounter(isolate, "c:" "V8.SizeOf_" #name);
|
| + INSTANCE_TYPE_LIST(SC)
|
| +#undef SC
|
| +
|
| +#define SC(name) \
|
| + count_of_CODE_TYPE_##name##_ = \
|
| + StatsCounter(isolate, "c:" "V8.CountOf_CODE_TYPE-" #name); \
|
| + size_of_CODE_TYPE_##name##_ = \
|
| + StatsCounter(isolate, "c:" "V8.SizeOf_CODE_TYPE-" #name);
|
| + CODE_KIND_LIST(SC)
|
| +#undef SC
|
| +
|
| +#define SC(name) \
|
| + count_of_FIXED_ARRAY_##name##_ = \
|
| + StatsCounter(isolate, "c:" "V8.CountOf_FIXED_ARRAY-" #name); \
|
| + size_of_FIXED_ARRAY_##name##_ = \
|
| + StatsCounter(isolate, "c:" "V8.SizeOf_FIXED_ARRAY-" #name);
|
| + FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC)
|
| +#undef SC
|
| +
|
| +#define SC(name) \
|
| + count_of_CODE_AGE_##name##_ = \
|
| + StatsCounter(isolate, "c:" "V8.CountOf_CODE_AGE-" #name); \
|
| + size_of_CODE_AGE_##name##_ = \
|
| + StatsCounter(isolate, "c:" "V8.SizeOf_CODE_AGE-" #name);
|
| + CODE_AGE_LIST_COMPLETE(SC)
|
| +#undef SC
|
| +}
|
| +
|
| +
|
| +void Counters::ResetHistograms() {
|
| +#define HT(name, caption) name##_.Reset();
|
| + HISTOGRAM_TIMER_LIST(HT)
|
| +#undef HT
|
| +
|
| +#define HP(name, caption) name##_.Reset();
|
| + HISTOGRAM_PERCENTAGE_LIST(HP)
|
| +#undef HP
|
| +
|
| +#define HM(name, caption) name##_.Reset();
|
| + HISTOGRAM_MEMORY_LIST(HM)
|
| +#undef HM
|
| +}
|
| +
|
| } } // namespace v8::internal
|
|
|