| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 #define SC(name) \ | 80 #define SC(name) \ |
| 81 StatsCounter count_of_FIXED_ARRAY_##name = { \ | 81 StatsCounter count_of_FIXED_ARRAY_##name = { \ |
| 82 "c:" "V8.CountOf_FIXED_ARRAY-" #name, NULL, false }; \ | 82 "c:" "V8.CountOf_FIXED_ARRAY-" #name, NULL, false }; \ |
| 83 count_of_FIXED_ARRAY_##name##_ = count_of_FIXED_ARRAY_##name; \ | 83 count_of_FIXED_ARRAY_##name##_ = count_of_FIXED_ARRAY_##name; \ |
| 84 StatsCounter size_of_FIXED_ARRAY_##name = { \ | 84 StatsCounter size_of_FIXED_ARRAY_##name = { \ |
| 85 "c:" "V8.SizeOf_FIXED_ARRAY-" #name, NULL, false }; \ | 85 "c:" "V8.SizeOf_FIXED_ARRAY-" #name, NULL, false }; \ |
| 86 size_of_FIXED_ARRAY_##name##_ = size_of_FIXED_ARRAY_##name; | 86 size_of_FIXED_ARRAY_##name##_ = size_of_FIXED_ARRAY_##name; |
| 87 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) | 87 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) |
| 88 #undef SC | 88 #undef SC |
| 89 | |
| 90 StatsCounter state_counters[] = { | |
| 91 #define COUNTER_NAME(name) \ | |
| 92 { "c:V8.State" #name, NULL, false }, | |
| 93 STATE_TAG_LIST(COUNTER_NAME) | |
| 94 #undef COUNTER_NAME | |
| 95 }; | |
| 96 | |
| 97 for (int i = 0; i < kSlidingStateWindowCounterCount; ++i) { | |
| 98 state_counters_[i] = state_counters[i]; | |
| 99 } | |
| 100 } | 89 } |
| 101 | 90 |
| 102 void Counters::ResetHistograms() { | 91 void Counters::ResetHistograms() { |
| 103 #define HT(name, caption) name##_.Reset(); | 92 #define HT(name, caption) name##_.Reset(); |
| 104 HISTOGRAM_TIMER_LIST(HT) | 93 HISTOGRAM_TIMER_LIST(HT) |
| 105 #undef HT | 94 #undef HT |
| 106 | 95 |
| 107 #define HP(name, caption) name##_.Reset(); | 96 #define HP(name, caption) name##_.Reset(); |
| 108 HISTOGRAM_PERCENTAGE_LIST(HP) | 97 HISTOGRAM_PERCENTAGE_LIST(HP) |
| 109 #undef HP | 98 #undef HP |
| 110 | 99 |
| 111 #define HM(name, caption) name##_.Reset(); | 100 #define HM(name, caption) name##_.Reset(); |
| 112 HISTOGRAM_MEMORY_LIST(HM) | 101 HISTOGRAM_MEMORY_LIST(HM) |
| 113 #undef HM | 102 #undef HM |
| 114 } | 103 } |
| 115 | 104 |
| 116 } } // namespace v8::internal | 105 } } // namespace v8::internal |
| OLD | NEW |