35 Counters::Counters() {
36 #define HT(name, caption) \
37 HistogramTimer name = { {#caption, 0, 10000, 50, NULL, false}, 0, 0 }; \
42 #define HP(name, caption) \
43 Histogram name = { #caption, 0, 101, 100, NULL, false }; \
48 #define HM(name, caption) \
49 Histogram name = { #caption, 1000, 500000, 50, NULL, false }; \
54 #define SC(name, caption) \
55 StatsCounter name = { "c:" #caption, NULL, false };\
63 StatsCounter count_of_##name = { "c:" "V8.CountOf_" #name, NULL, false };\
64 count_of_##name##_ = count_of_##name; \
65 StatsCounter size_of_##name = { "c:" "V8.SizeOf_" #name, NULL, false };\
66 size_of_##name##_ = size_of_##name;
71 StatsCounter count_of_CODE_TYPE_##name = { \
72 "c:" "V8.CountOf_CODE_TYPE-" #name, NULL, false }; \
73 count_of_CODE_TYPE_##name##_ = count_of_CODE_TYPE_##name; \
74 StatsCounter size_of_CODE_TYPE_##name = { \
75 "c:" "V8.SizeOf_CODE_TYPE-" #name, NULL, false }; \
76 size_of_CODE_TYPE_##name##_ = size_of_CODE_TYPE_##name;
81 StatsCounter count_of_FIXED_ARRAY_##name = { \
82 "c:" "V8.CountOf_FIXED_ARRAY-" #name, NULL, false }; \
83 count_of_FIXED_ARRAY_##name##_ = count_of_FIXED_ARRAY_##name; \
84 StatsCounter size_of_FIXED_ARRAY_##name = { \
85 "c:" "V8.SizeOf_FIXED_ARRAY-" #name, NULL, false }; \
86 size_of_FIXED_ARRAY_##name##_ = size_of_FIXED_ARRAY_##name;
91 #define COUNTER_NAME(name) \
92 { "c:V8.State" #name, NULL, false },
97 for (
int i = 0; i < kSlidingStateWindowCounterCount; ++i) {
98 state_counters_[i] = state_counters[i];
103 #define HT(name, caption) name##_.Reset();
107 #define HP(name, caption) name##_.Reset();
111 #define HM(name, caption) name##_.Reset();
#define INSTANCE_TYPE_LIST(V)
#define HM(name, caption)
#define STATS_COUNTER_LIST_2(SC)
#define HISTOGRAM_MEMORY_LIST(HM)
#define HISTOGRAM_PERCENTAGE_LIST(HP)
#define HT(name, caption)
#define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V)
#define CODE_KIND_LIST(V)
#define SC(name, caption)
#define HISTOGRAM_TIMER_LIST(HT)
#define HP(name, caption)
#define COUNTER_NAME(name)
#define STATS_COUNTER_LIST_1(SC)
StatsCounter * state_counters(StateTag state)
#define STATE_TAG_LIST(V)