1// Copyright 2012 the V8 project authors. All rights reserved.
2// Redistribution and use in source and binary forms, with or without
3// modification, are permitted provided that the following conditions are
4// met:
5//
6//     * Redistributions of source code must retain the above copyright
7//       notice, this list of conditions and the following disclaimer.
8//     * Redistributions in binary form must reproduce the above
9//       copyright notice, this list of conditions and the following
10//       disclaimer in the documentation and/or other materials provided
11//       with the distribution.
12//     * Neither the name of Google Inc. nor the names of its
13//       contributors may be used to endorse or promote products derived
14//       from this software without specific prior written permission.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28#ifndef V8_V8_COUNTERS_H_
29#define V8_V8_COUNTERS_H_
30
31#include "allocation.h"
32#include "counters.h"
33#include "objects.h"
34#include "v8globals.h"
35
36namespace v8 {
37namespace internal {
38
39#define HISTOGRAM_TIMER_LIST(HT)                                      \
40  /* Garbage collection timers. */                                    \
41  HT(gc_compactor, V8.GCCompactor)                                    \
42  HT(gc_scavenger, V8.GCScavenger)                                    \
43  HT(gc_context, V8.GCContext) /* GC context cleanup time */          \
44  /* Parsing timers. */                                               \
45  HT(parse, V8.Parse)                                                 \
46  HT(parse_lazy, V8.ParseLazy)                                        \
47  HT(pre_parse, V8.PreParse)                                          \
48  /* Total compilation times. */                                      \
49  HT(compile, V8.Compile)                                             \
50  HT(compile_eval, V8.CompileEval)                                    \
51  HT(compile_lazy, V8.CompileLazy)
52
53#define HISTOGRAM_PERCENTAGE_LIST(HP)                                 \
54  /* Heap fragmentation. */                                           \
55  HP(external_fragmentation_total,                                    \
56     V8.MemoryExternalFragmentationTotal)                             \
57  HP(external_fragmentation_old_pointer_space,                        \
58     V8.MemoryExternalFragmentationOldPointerSpace)                   \
59  HP(external_fragmentation_old_data_space,                           \
60     V8.MemoryExternalFragmentationOldDataSpace)                      \
61  HP(external_fragmentation_code_space,                               \
62     V8.MemoryExternalFragmentationCodeSpace)                         \
63  HP(external_fragmentation_map_space,                                \
64     V8.MemoryExternalFragmentationMapSpace)                          \
65  HP(external_fragmentation_cell_space,                               \
66     V8.MemoryExternalFragmentationCellSpace)                         \
67  HP(external_fragmentation_property_cell_space,                      \
68     V8.MemoryExternalFragmentationPropertyCellSpace)                 \
69  HP(external_fragmentation_lo_space,                                 \
70     V8.MemoryExternalFragmentationLoSpace)                           \
71  /* Percentages of heap committed to each space. */                  \
72  HP(heap_fraction_new_space,                                         \
73     V8.MemoryHeapFractionNewSpace)                                   \
74  HP(heap_fraction_old_pointer_space,                                 \
75     V8.MemoryHeapFractionOldPointerSpace)                            \
76  HP(heap_fraction_old_data_space,                                    \
77     V8.MemoryHeapFractionOldDataSpace)                               \
78  HP(heap_fraction_code_space,                                        \
79     V8.MemoryHeapFractionCodeSpace)                                  \
80  HP(heap_fraction_map_space,                                         \
81     V8.MemoryHeapFractionMapSpace)                                   \
82  HP(heap_fraction_cell_space,                                        \
83     V8.MemoryHeapFractionCellSpace)                                  \
84  HP(heap_fraction_property_cell_space,                               \
85     V8.MemoryHeapFractionPropertyCellSpace)                          \
86  HP(heap_fraction_lo_space,                                          \
87     V8.MemoryHeapFractionLoSpace)                                    \
88  /* Percentage of crankshafted codegen. */                           \
89  HP(codegen_fraction_crankshaft,                                     \
90     V8.CodegenFractionCrankshaft)                                    \
91
92
93#define HISTOGRAM_MEMORY_LIST(HM)                                     \
94  HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted)  \
95  HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed)            \
96  HM(heap_sample_map_space_committed,                                 \
97     V8.MemoryHeapSampleMapSpaceCommitted)                            \
98  HM(heap_sample_cell_space_committed,                                \
99     V8.MemoryHeapSampleCellSpaceCommitted)                           \
100  HM(heap_sample_property_cell_space_committed,                       \
101     V8.MemoryHeapSamplePropertyCellSpaceCommitted)                   \
102  HM(heap_sample_code_space_committed,                                \
103     V8.MemoryHeapSampleCodeSpaceCommitted)                           \
104  HM(heap_sample_maximum_committed,                                   \
105     V8.MemoryHeapSampleMaximumCommitted)                             \
106
107
108// WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC
109// Intellisense to crash.  It was broken into two macros (each of length 40
110// lines) rather than one macro (of length about 80 lines) to work around
111// this problem.  Please avoid using recursive macros of this length when
112// possible.
113#define STATS_COUNTER_LIST_1(SC)                                      \
114  /* Global Handle Count*/                                            \
115  SC(global_handles, V8.GlobalHandles)                                \
116  /* OS Memory allocated */                                           \
117  SC(memory_allocated, V8.OsMemoryAllocated)                          \
118  SC(normalized_maps, V8.NormalizedMaps)                              \
119  SC(props_to_dictionary, V8.ObjectPropertiesToDictionary)            \
120  SC(elements_to_dictionary, V8.ObjectElementsToDictionary)           \
121  SC(alive_after_last_gc, V8.AliveAfterLastGC)                        \
122  SC(objs_since_last_young, V8.ObjsSinceLastYoung)                    \
123  SC(objs_since_last_full, V8.ObjsSinceLastFull)                      \
124  SC(string_table_capacity, V8.StringTableCapacity)                   \
125  SC(number_of_symbols, V8.NumberOfSymbols)                           \
126  SC(script_wrappers, V8.ScriptWrappers)                              \
127  SC(call_initialize_stubs, V8.CallInitializeStubs)                   \
128  SC(call_premonomorphic_stubs, V8.CallPreMonomorphicStubs)           \
129  SC(call_normal_stubs, V8.CallNormalStubs)                           \
130  SC(call_megamorphic_stubs, V8.CallMegamorphicStubs)                 \
131  SC(arguments_adaptors, V8.ArgumentsAdaptors)                        \
132  SC(compilation_cache_hits, V8.CompilationCacheHits)                 \
133  SC(compilation_cache_misses, V8.CompilationCacheMisses)             \
134  SC(string_ctor_calls, V8.StringConstructorCalls)                    \
135  SC(string_ctor_conversions, V8.StringConstructorConversions)        \
136  SC(string_ctor_cached_number, V8.StringConstructorCachedNumber)     \
137  SC(string_ctor_string_value, V8.StringConstructorStringValue)       \
138  SC(string_ctor_gc_required, V8.StringConstructorGCRequired)         \
139  /* Amount of evaled source code. */                                 \
140  SC(total_eval_size, V8.TotalEvalSize)                               \
141  /* Amount of loaded source code. */                                 \
142  SC(total_load_size, V8.TotalLoadSize)                               \
143  /* Amount of parsed source code. */                                 \
144  SC(total_parse_size, V8.TotalParseSize)                             \
145  /* Amount of source code skipped over using preparsing. */          \
146  SC(total_preparse_skipped, V8.TotalPreparseSkipped)                 \
147  /* Number of symbol lookups skipped using preparsing */             \
148  SC(total_preparse_symbols_skipped, V8.TotalPreparseSymbolSkipped)   \
149  /* Amount of compiled source code. */                               \
150  SC(total_compile_size, V8.TotalCompileSize)                         \
151  /* Amount of source code compiled with the full codegen. */         \
152  SC(total_full_codegen_source_size, V8.TotalFullCodegenSourceSize)   \
153  /* Number of contexts created from scratch. */                      \
154  SC(contexts_created_from_scratch, V8.ContextsCreatedFromScratch)    \
155  /* Number of contexts created by partial snapshot. */               \
156  SC(contexts_created_by_snapshot, V8.ContextsCreatedBySnapshot)      \
157  /* Number of code objects found from pc. */                         \
158  SC(pc_to_code, V8.PcToCode)                                         \
159  SC(pc_to_code_cached, V8.PcToCodeCached)                            \
160  /* The store-buffer implementation of the write barrier. */         \
161  SC(store_buffer_compactions, V8.StoreBufferCompactions)             \
162  SC(store_buffer_overflows, V8.StoreBufferOverflows)
163
164
165#define STATS_COUNTER_LIST_2(SC)                                      \
166  /* Number of code stubs. */                                         \
167  SC(code_stubs, V8.CodeStubs)                                        \
168  /* Amount of stub code. */                                          \
169  SC(total_stubs_code_size, V8.TotalStubsCodeSize)                    \
170  /* Amount of (JS) compiled code. */                                 \
171  SC(total_compiled_code_size, V8.TotalCompiledCodeSize)              \
172  SC(gc_compactor_caused_by_request, V8.GCCompactorCausedByRequest)   \
173  SC(gc_compactor_caused_by_promoted_data,                            \
174     V8.GCCompactorCausedByPromotedData)                              \
175  SC(gc_compactor_caused_by_oldspace_exhaustion,                      \
176     V8.GCCompactorCausedByOldspaceExhaustion)                        \
177  SC(gc_last_resort_from_js, V8.GCLastResortFromJS)                   \
178  SC(gc_last_resort_from_handles, V8.GCLastResortFromHandles)         \
179  /* How is the generic keyed-load stub used? */                      \
180  SC(keyed_load_generic_smi, V8.KeyedLoadGenericSmi)                  \
181  SC(keyed_load_generic_symbol, V8.KeyedLoadGenericSymbol)            \
182  SC(keyed_load_generic_lookup_cache, V8.KeyedLoadGenericLookupCache) \
183  SC(keyed_load_generic_slow, V8.KeyedLoadGenericSlow)                \
184  SC(keyed_load_polymorphic_stubs, V8.KeyedLoadPolymorphicStubs)      \
185  SC(keyed_load_external_array_slow, V8.KeyedLoadExternalArraySlow)   \
186  /* How is the generic keyed-call stub used? */                      \
187  SC(keyed_call_generic_smi_fast, V8.KeyedCallGenericSmiFast)         \
188  SC(keyed_call_generic_smi_dict, V8.KeyedCallGenericSmiDict)         \
189  SC(keyed_call_generic_lookup_cache, V8.KeyedCallGenericLookupCache) \
190  SC(keyed_call_generic_lookup_dict, V8.KeyedCallGenericLookupDict)   \
191  SC(keyed_call_generic_slow, V8.KeyedCallGenericSlow)                \
192  SC(keyed_call_generic_slow_load, V8.KeyedCallGenericSlowLoad)       \
193  SC(named_load_global_stub, V8.NamedLoadGlobalStub)                  \
194  SC(named_store_global_inline, V8.NamedStoreGlobalInline)            \
195  SC(named_store_global_inline_miss, V8.NamedStoreGlobalInlineMiss)   \
196  SC(keyed_store_polymorphic_stubs, V8.KeyedStorePolymorphicStubs)    \
197  SC(keyed_store_external_array_slow, V8.KeyedStoreExternalArraySlow) \
198  SC(store_normal_miss, V8.StoreNormalMiss)                           \
199  SC(store_normal_hit, V8.StoreNormalHit)                             \
200  SC(cow_arrays_created_stub, V8.COWArraysCreatedStub)                \
201  SC(cow_arrays_created_runtime, V8.COWArraysCreatedRuntime)          \
202  SC(cow_arrays_converted, V8.COWArraysConverted)                     \
203  SC(call_miss, V8.CallMiss)                                          \
204  SC(keyed_call_miss, V8.KeyedCallMiss)                               \
205  SC(load_miss, V8.LoadMiss)                                          \
206  SC(keyed_load_miss, V8.KeyedLoadMiss)                               \
207  SC(call_const, V8.CallConst)                                        \
208  SC(call_const_fast_api, V8.CallConstFastApi)                        \
209  SC(call_const_interceptor, V8.CallConstInterceptor)                 \
210  SC(call_const_interceptor_fast_api, V8.CallConstInterceptorFastApi) \
211  SC(call_global_inline, V8.CallGlobalInline)                         \
212  SC(call_global_inline_miss, V8.CallGlobalInlineMiss)                \
213  SC(constructed_objects, V8.ConstructedObjects)                      \
214  SC(constructed_objects_runtime, V8.ConstructedObjectsRuntime)       \
215  SC(negative_lookups, V8.NegativeLookups)                            \
216  SC(negative_lookups_miss, V8.NegativeLookupsMiss)                   \
217  SC(megamorphic_stub_cache_probes, V8.MegamorphicStubCacheProbes)    \
218  SC(megamorphic_stub_cache_misses, V8.MegamorphicStubCacheMisses)    \
219  SC(megamorphic_stub_cache_updates, V8.MegamorphicStubCacheUpdates)  \
220  SC(array_function_runtime, V8.ArrayFunctionRuntime)                 \
221  SC(array_function_native, V8.ArrayFunctionNative)                   \
222  SC(for_in, V8.ForIn)                                                \
223  SC(enum_cache_hits, V8.EnumCacheHits)                               \
224  SC(enum_cache_misses, V8.EnumCacheMisses)                           \
225  SC(zone_segment_bytes, V8.ZoneSegmentBytes)                         \
226  SC(fast_new_closure_total, V8.FastNewClosureTotal)                  \
227  SC(fast_new_closure_try_optimized, V8.FastNewClosureTryOptimized)   \
228  SC(fast_new_closure_install_optimized, V8.FastNewClosureInstallOptimized) \
229  SC(string_add_runtime, V8.StringAddRuntime)                         \
230  SC(string_add_native, V8.StringAddNative)                           \
231  SC(string_add_runtime_ext_to_ascii, V8.StringAddRuntimeExtToAscii)  \
232  SC(sub_string_runtime, V8.SubStringRuntime)                         \
233  SC(sub_string_native, V8.SubStringNative)                           \
234  SC(string_add_make_two_char, V8.StringAddMakeTwoChar)               \
235  SC(string_compare_native, V8.StringCompareNative)                   \
236  SC(string_compare_runtime, V8.StringCompareRuntime)                 \
237  SC(regexp_entry_runtime, V8.RegExpEntryRuntime)                     \
238  SC(regexp_entry_native, V8.RegExpEntryNative)                       \
239  SC(number_to_string_native, V8.NumberToStringNative)                \
240  SC(number_to_string_runtime, V8.NumberToStringRuntime)              \
241  SC(math_acos, V8.MathAcos)                                          \
242  SC(math_asin, V8.MathAsin)                                          \
243  SC(math_atan, V8.MathAtan)                                          \
244  SC(math_atan2, V8.MathAtan2)                                        \
245  SC(math_cos, V8.MathCos)                                            \
246  SC(math_exp, V8.MathExp)                                            \
247  SC(math_floor, V8.MathFloor)                                        \
248  SC(math_log, V8.MathLog)                                            \
249  SC(math_pow, V8.MathPow)                                            \
250  SC(math_round, V8.MathRound)                                        \
251  SC(math_sin, V8.MathSin)                                            \
252  SC(math_sqrt, V8.MathSqrt)                                          \
253  SC(math_tan, V8.MathTan)                                            \
254  SC(transcendental_cache_hit, V8.TranscendentalCacheHit)             \
255  SC(transcendental_cache_miss, V8.TranscendentalCacheMiss)           \
256  SC(stack_interrupts, V8.StackInterrupts)                            \
257  SC(runtime_profiler_ticks, V8.RuntimeProfilerTicks)                 \
258  SC(bounds_checks_eliminated, V8.BoundsChecksEliminated)             \
259  SC(bounds_checks_hoisted, V8.BoundsChecksHoisted)                   \
260  SC(soft_deopts_requested, V8.SoftDeoptsRequested)                   \
261  SC(soft_deopts_inserted, V8.SoftDeoptsInserted)                     \
262  SC(soft_deopts_executed, V8.SoftDeoptsExecuted)                     \
263  /* Number of write barriers in generated code. */                   \
264  SC(write_barriers_dynamic, V8.WriteBarriersDynamic)                 \
265  SC(write_barriers_static, V8.WriteBarriersStatic)                   \
266  SC(new_space_bytes_available, V8.MemoryNewSpaceBytesAvailable)      \
267  SC(new_space_bytes_committed, V8.MemoryNewSpaceBytesCommitted)      \
268  SC(new_space_bytes_used, V8.MemoryNewSpaceBytesUsed)                \
269  SC(old_pointer_space_bytes_available,                               \
270     V8.MemoryOldPointerSpaceBytesAvailable)                          \
271  SC(old_pointer_space_bytes_committed,                               \
272     V8.MemoryOldPointerSpaceBytesCommitted)                          \
273  SC(old_pointer_space_bytes_used, V8.MemoryOldPointerSpaceBytesUsed) \
274  SC(old_data_space_bytes_available, V8.MemoryOldDataSpaceBytesAvailable) \
275  SC(old_data_space_bytes_committed, V8.MemoryOldDataSpaceBytesCommitted) \
276  SC(old_data_space_bytes_used, V8.MemoryOldDataSpaceBytesUsed)       \
277  SC(code_space_bytes_available, V8.MemoryCodeSpaceBytesAvailable)    \
278  SC(code_space_bytes_committed, V8.MemoryCodeSpaceBytesCommitted)    \
279  SC(code_space_bytes_used, V8.MemoryCodeSpaceBytesUsed)              \
280  SC(map_space_bytes_available, V8.MemoryMapSpaceBytesAvailable)      \
281  SC(map_space_bytes_committed, V8.MemoryMapSpaceBytesCommitted)      \
282  SC(map_space_bytes_used, V8.MemoryMapSpaceBytesUsed)                \
283  SC(cell_space_bytes_available, V8.MemoryCellSpaceBytesAvailable)    \
284  SC(cell_space_bytes_committed, V8.MemoryCellSpaceBytesCommitted)    \
285  SC(cell_space_bytes_used, V8.MemoryCellSpaceBytesUsed)              \
286  SC(property_cell_space_bytes_available,                             \
287     V8.MemoryPropertyCellSpaceBytesAvailable)                        \
288  SC(property_cell_space_bytes_committed,                             \
289     V8.MemoryPropertyCellSpaceBytesCommitted)                        \
290  SC(property_cell_space_bytes_used,                                  \
291     V8.MemoryPropertyCellSpaceBytesUsed)                             \
292  SC(lo_space_bytes_available, V8.MemoryLoSpaceBytesAvailable)        \
293  SC(lo_space_bytes_committed, V8.MemoryLoSpaceBytesCommitted)        \
294  SC(lo_space_bytes_used, V8.MemoryLoSpaceBytesUsed)
295
296
297// This file contains all the v8 counters that are in use.
298class Counters {
299 public:
300#define HT(name, caption) \
301  HistogramTimer* name() { return &name##_; }
302  HISTOGRAM_TIMER_LIST(HT)
303#undef HT
304
305#define HP(name, caption) \
306  Histogram* name() { return &name##_; }
307  HISTOGRAM_PERCENTAGE_LIST(HP)
308#undef HP
309
310#define HM(name, caption) \
311  Histogram* name() { return &name##_; }
312  HISTOGRAM_MEMORY_LIST(HM)
313#undef HM
314
315#define SC(name, caption) \
316  StatsCounter* name() { return &name##_; }
317  STATS_COUNTER_LIST_1(SC)
318  STATS_COUNTER_LIST_2(SC)
319#undef SC
320
321#define SC(name) \
322  StatsCounter* count_of_##name() { return &count_of_##name##_; } \
323  StatsCounter* size_of_##name() { return &size_of_##name##_; }
324  INSTANCE_TYPE_LIST(SC)
325#undef SC
326
327#define SC(name) \
328  StatsCounter* count_of_CODE_TYPE_##name() \
329    { return &count_of_CODE_TYPE_##name##_; } \
330  StatsCounter* size_of_CODE_TYPE_##name() \
331    { return &size_of_CODE_TYPE_##name##_; }
332  CODE_KIND_LIST(SC)
333#undef SC
334
335#define SC(name) \
336  StatsCounter* count_of_FIXED_ARRAY_##name() \
337    { return &count_of_FIXED_ARRAY_##name##_; } \
338  StatsCounter* size_of_FIXED_ARRAY_##name() \
339    { return &size_of_FIXED_ARRAY_##name##_; }
340  FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC)
341#undef SC
342
343#define SC(name) \
344  StatsCounter* count_of_CODE_AGE_##name() \
345    { return &count_of_CODE_AGE_##name##_; } \
346  StatsCounter* size_of_CODE_AGE_##name() \
347    { return &size_of_CODE_AGE_##name##_; }
348  CODE_AGE_LIST_COMPLETE(SC)
349#undef SC
350
351  enum Id {
352#define RATE_ID(name, caption) k_##name,
353    HISTOGRAM_TIMER_LIST(RATE_ID)
354#undef RATE_ID
355#define PERCENTAGE_ID(name, caption) k_##name,
356    HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID)
357#undef PERCENTAGE_ID
358#define MEMORY_ID(name, caption) k_##name,
359    HISTOGRAM_MEMORY_LIST(MEMORY_ID)
360#undef MEMORY_ID
361#define COUNTER_ID(name, caption) k_##name,
362    STATS_COUNTER_LIST_1(COUNTER_ID)
363    STATS_COUNTER_LIST_2(COUNTER_ID)
364#undef COUNTER_ID
365#define COUNTER_ID(name) kCountOf##name, kSizeOf##name,
366    INSTANCE_TYPE_LIST(COUNTER_ID)
367#undef COUNTER_ID
368#define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \
369    kSizeOfCODE_TYPE_##name,
370    CODE_KIND_LIST(COUNTER_ID)
371#undef COUNTER_ID
372#define COUNTER_ID(name) kCountOfFIXED_ARRAY__##name, \
373    kSizeOfFIXED_ARRAY__##name,
374    FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(COUNTER_ID)
375#undef COUNTER_ID
376#define COUNTER_ID(name) kCountOfCODE_AGE__##name, \
377    kSizeOfCODE_AGE__##name,
378    CODE_AGE_LIST_COMPLETE(COUNTER_ID)
379#undef COUNTER_ID
380    stats_counter_count
381  };
382
383  void ResetHistograms();
384
385 private:
386#define HT(name, caption) \
387  HistogramTimer name##_;
388  HISTOGRAM_TIMER_LIST(HT)
389#undef HT
390
391#define HP(name, caption) \
392  Histogram name##_;
393  HISTOGRAM_PERCENTAGE_LIST(HP)
394#undef HP
395
396#define HM(name, caption) \
397  Histogram name##_;
398  HISTOGRAM_MEMORY_LIST(HM)
399#undef HM
400
401#define SC(name, caption) \
402  StatsCounter name##_;
403  STATS_COUNTER_LIST_1(SC)
404  STATS_COUNTER_LIST_2(SC)
405#undef SC
406
407#define SC(name) \
408  StatsCounter size_of_##name##_; \
409  StatsCounter count_of_##name##_;
410  INSTANCE_TYPE_LIST(SC)
411#undef SC
412
413#define SC(name) \
414  StatsCounter size_of_CODE_TYPE_##name##_; \
415  StatsCounter count_of_CODE_TYPE_##name##_;
416  CODE_KIND_LIST(SC)
417#undef SC
418
419#define SC(name) \
420  StatsCounter size_of_FIXED_ARRAY_##name##_; \
421  StatsCounter count_of_FIXED_ARRAY_##name##_;
422  FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC)
423#undef SC
424
425#define SC(name) \
426  StatsCounter size_of_CODE_AGE_##name##_; \
427  StatsCounter count_of_CODE_AGE_##name##_;
428  CODE_AGE_LIST_COMPLETE(SC)
429#undef SC
430
431  friend class Isolate;
432
433  explicit Counters(Isolate* isolate);
434
435  DISALLOW_IMPLICIT_CONSTRUCTORS(Counters);
436};
437
438} }  // namespace v8::internal
439
440#endif  // V8_V8_COUNTERS_H_
441