| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 SC(for_in, V8.ForIn) \ | 115 SC(for_in, V8.ForIn) \ |
| 116 SC(enum_cache_hits, V8.EnumCacheHits) \ | 116 SC(enum_cache_hits, V8.EnumCacheHits) \ |
| 117 SC(enum_cache_misses, V8.EnumCacheMisses) \ | 117 SC(enum_cache_misses, V8.EnumCacheMisses) \ |
| 118 SC(reloc_info_count, V8.RelocInfoCount) \ | 118 SC(reloc_info_count, V8.RelocInfoCount) \ |
| 119 SC(reloc_info_size, V8.RelocInfoSize) | 119 SC(reloc_info_size, V8.RelocInfoSize) |
| 120 | 120 |
| 121 | 121 |
| 122 // This file contains all the v8 counters that are in use. | 122 // This file contains all the v8 counters that are in use. |
| 123 class Counters : AllStatic { | 123 class Counters : AllStatic { |
| 124 public: | 124 public: |
| 125 #define SR(name, caption) static StatsRate name; | 125 #define SR(name, caption) \ |
| 126 static StatsRate name; |
| 126 STATS_RATE_LIST(SR) | 127 STATS_RATE_LIST(SR) |
| 127 #undef SR | 128 #undef SR |
| 128 | 129 |
| 129 #define SC(name, caption) static StatsCounter name; | 130 #define SC(name, caption) \ |
| 131 static StatsCounter name; |
| 130 STATS_COUNTER_LIST_1(SC) | 132 STATS_COUNTER_LIST_1(SC) |
| 131 STATS_COUNTER_LIST_2(SC) | 133 STATS_COUNTER_LIST_2(SC) |
| 132 #undef SC | 134 #undef SC |
| 133 | 135 |
| 134 enum Id { | 136 enum Id { |
| 135 #define RATE_ID(name, caption) k_##name, | 137 #define RATE_ID(name, caption) k_##name, |
| 136 STATS_RATE_LIST(RATE_ID) | 138 STATS_RATE_LIST(RATE_ID) |
| 137 #undef RATE_ID | 139 #undef RATE_ID |
| 138 #define COUNTER_ID(name, caption) k_##name, | 140 #define COUNTER_ID(name, caption) k_##name, |
| 139 STATS_COUNTER_LIST_1(COUNTER_ID) | 141 STATS_COUNTER_LIST_1(COUNTER_ID) |
| 140 STATS_COUNTER_LIST_2(COUNTER_ID) | 142 STATS_COUNTER_LIST_2(COUNTER_ID) |
| 141 #undef COUNTER_ID | 143 #undef COUNTER_ID |
| 142 #define COUNTER_ID(name) k_##name, | 144 #define COUNTER_ID(name) k_##name, |
| 143 STATE_TAG_LIST(COUNTER_ID) | 145 STATE_TAG_LIST(COUNTER_ID) |
| 144 #undef COUNTER_ID | 146 #undef COUNTER_ID |
| 145 stats_counter_count | 147 stats_counter_count |
| 146 }; | 148 }; |
| 147 | 149 |
| 148 // Sliding state window counters. | 150 // Sliding state window counters. |
| 149 static StatsCounter state_counters[]; | 151 static StatsCounter state_counters[]; |
| 150 }; | 152 }; |
| 151 | 153 |
| 152 } } // namespace v8::internal | 154 } } // namespace v8::internal |
| 153 | 155 |
| 154 #endif // V8_COUNTERS_H_ | 156 #endif // V8_COUNTERS_H_ |
| OLD | NEW |