| Index: src/v8-counters.h
|
| diff --git a/src/v8-counters.h b/src/v8-counters.h
|
| index dc55042b462ee08a86d7685ea4176fe050c3fb6d..f25ebdcd8839601c90ba5fcd1e0fa6a3d7f606e1 100644
|
| --- a/src/v8-counters.h
|
| +++ b/src/v8-counters.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2011 the V8 project authors. All rights reserved.
|
| +// Copyright 2012 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -50,6 +50,23 @@ namespace internal {
|
| HT(compile_lazy, V8.CompileLazy)
|
|
|
|
|
| +#define HISTOGRAM_PERCENTAGE_LIST(HP) \
|
| + HP(external_fragmentation_new_space, \
|
| + V8.MemoryExternalFragmentationNewSpace) \
|
| + HP(external_fragmentation_old_pointer_space, \
|
| + V8.MemoryExternalFragmentationOldPointerSpace) \
|
| + HP(external_fragmentation_old_data_space, \
|
| + V8.MemoryExternalFragmentationOldDataSpace) \
|
| + HP(external_fragmentation_code_space, \
|
| + V8.MemoryExternalFragmentationCodeSpace) \
|
| + HP(external_fragmentation_map_space, \
|
| + V8.MemoryExternalFragmentationMapSpace) \
|
| + HP(external_fragmentation_cell_space, \
|
| + V8.MemoryExternalFragmentationCellSpace) \
|
| + HP(external_fragmentation_lo_space, \
|
| + V8.MemoryExternalFragmentationLoSpace)
|
| +
|
| +
|
| // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC
|
| // Intellisense to crash. It was broken into two macros (each of length 40
|
| // lines) rather than one macro (of length about 80 lines) to work around
|
| @@ -280,6 +297,11 @@ class Counters {
|
| HISTOGRAM_TIMER_LIST(HT)
|
| #undef HT
|
|
|
| +#define HP(name, caption) \
|
| + Histogram* name() { return &name##_; }
|
| + HISTOGRAM_PERCENTAGE_LIST(HP)
|
| +#undef HP
|
| +
|
| #define SC(name, caption) \
|
| StatsCounter* name() { return &name##_; }
|
| STATS_COUNTER_LIST_1(SC)
|
| @@ -290,6 +312,9 @@ class Counters {
|
| #define RATE_ID(name, caption) k_##name,
|
| HISTOGRAM_TIMER_LIST(RATE_ID)
|
| #undef RATE_ID
|
| +#define PERCENTAGE_ID(name, caption) k_##name,
|
| + HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID)
|
| +#undef PERCENTAGE_ID
|
| #define COUNTER_ID(name, caption) k_##name,
|
| STATS_COUNTER_LIST_1(COUNTER_ID)
|
| STATS_COUNTER_LIST_2(COUNTER_ID)
|
| @@ -310,6 +335,11 @@ class Counters {
|
| HISTOGRAM_TIMER_LIST(HT)
|
| #undef HT
|
|
|
| +#define HP(name, caption) \
|
| + Histogram name##_;
|
| + HISTOGRAM_PERCENTAGE_LIST(HP)
|
| +#undef HP
|
| +
|
| #define SC(name, caption) \
|
| StatsCounter name##_;
|
| STATS_COUNTER_LIST_1(SC)
|
|
|