| 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 7193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7204 counters->count_of_##name()->Increment( \ | 7204 counters->count_of_##name()->Increment( \ |
| 7205 static_cast<int>(object_counts_[name])); \ | 7205 static_cast<int>(object_counts_[name])); \ |
| 7206 counters->count_of_##name()->Decrement( \ | 7206 counters->count_of_##name()->Decrement( \ |
| 7207 static_cast<int>(object_counts_last_time_[name])); \ | 7207 static_cast<int>(object_counts_last_time_[name])); \ |
| 7208 counters->size_of_##name()->Increment( \ | 7208 counters->size_of_##name()->Increment( \ |
| 7209 static_cast<int>(object_sizes_[name])); \ | 7209 static_cast<int>(object_sizes_[name])); \ |
| 7210 counters->size_of_##name()->Decrement( \ | 7210 counters->size_of_##name()->Decrement( \ |
| 7211 static_cast<int>(object_sizes_last_time_[name])); | 7211 static_cast<int>(object_sizes_last_time_[name])); |
| 7212 INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7212 INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7213 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7213 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7214 #define ADJUST_LAST_TIME_OBJECT_COUNT(name) \ |
| 7215 counters->count_of_CODE_TYPE_##name()->Increment( \ |
| 7216 object_counts_[FIRST_CODE_KIND_SUB_TYPE + Code::name]); \ |
| 7217 counters->count_of_CODE_TYPE_##name()->Decrement( \ |
| 7218 object_counts_last_time_[FIRST_CODE_KIND_SUB_TYPE + Code::name]); \ |
| 7219 counters->size_of_CODE_TYPE_##name()->Increment( \ |
| 7220 object_sizes_[FIRST_CODE_KIND_SUB_TYPE + Code::name]); \ |
| 7221 counters->size_of_CODE_TYPE_##name()->Decrement( \ |
| 7222 object_sizes_last_time_[FIRST_CODE_KIND_SUB_TYPE + Code::name]); |
| 7223 CODE_KIND_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7224 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7225 |
| 7214 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7226 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7215 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7227 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7216 ClearObjectStats(); | 7228 ClearObjectStats(); |
| 7217 } | 7229 } |
| 7218 | 7230 |
| 7219 } } // namespace v8::internal | 7231 } } // namespace v8::internal |
| OLD | NEW |