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 7926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7937 counters->count_of_FIXED_ARRAY_##name()->Increment( \ | 7937 counters->count_of_FIXED_ARRAY_##name()->Increment( \ |
7938 static_cast<int>(object_counts_[index])); \ | 7938 static_cast<int>(object_counts_[index])); \ |
7939 counters->count_of_FIXED_ARRAY_##name()->Decrement( \ | 7939 counters->count_of_FIXED_ARRAY_##name()->Decrement( \ |
7940 static_cast<int>(object_counts_last_time_[index])); \ | 7940 static_cast<int>(object_counts_last_time_[index])); \ |
7941 counters->size_of_FIXED_ARRAY_##name()->Increment( \ | 7941 counters->size_of_FIXED_ARRAY_##name()->Increment( \ |
7942 static_cast<int>(object_sizes_[index])); \ | 7942 static_cast<int>(object_sizes_[index])); \ |
7943 counters->size_of_FIXED_ARRAY_##name()->Decrement( \ | 7943 counters->size_of_FIXED_ARRAY_##name()->Decrement( \ |
7944 static_cast<int>(object_sizes_last_time_[index])); | 7944 static_cast<int>(object_sizes_last_time_[index])); |
7945 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7945 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
7946 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7946 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7947 #define ADJUST_LAST_TIME_OBJECT_COUNT(name) \ | 7947 #define ADJUST_LAST_TIME_OBJECT_COUNT(name) \ |
7948 index = FIRST_CODE_AGE_SUB_TYPE + Code::k##name##CodeAge; \ | 7948 index = \ |
7949 counters->count_of_CODE_AGE_##name()->Increment( \ | 7949 FIRST_CODE_AGE_SUB_TYPE + Code::k##name##CodeAge - Code::kFirstCodeAge; \ |
7950 static_cast<int>(object_counts_[index])); \ | 7950 counters->count_of_CODE_AGE_##name()->Increment( \ |
7951 counters->count_of_CODE_AGE_##name()->Decrement( \ | 7951 static_cast<int>(object_counts_[index])); \ |
7952 static_cast<int>(object_counts_last_time_[index])); \ | 7952 counters->count_of_CODE_AGE_##name()->Decrement( \ |
7953 counters->size_of_CODE_AGE_##name()->Increment( \ | 7953 static_cast<int>(object_counts_last_time_[index])); \ |
7954 static_cast<int>(object_sizes_[index])); \ | 7954 counters->size_of_CODE_AGE_##name()->Increment( \ |
7955 counters->size_of_CODE_AGE_##name()->Decrement( \ | 7955 static_cast<int>(object_sizes_[index])); \ |
| 7956 counters->size_of_CODE_AGE_##name()->Decrement( \ |
7956 static_cast<int>(object_sizes_last_time_[index])); | 7957 static_cast<int>(object_sizes_last_time_[index])); |
7957 CODE_AGE_LIST_WITH_NO_AGE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7958 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
7958 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7959 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7959 | 7960 |
7960 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7961 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7961 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7962 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7962 ClearObjectStats(); | 7963 ClearObjectStats(); |
7963 } | 7964 } |
7964 | 7965 |
7965 | 7966 |
7966 Heap::RelocationLock::RelocationLock(Heap* heap) : heap_(heap) { | 7967 Heap::RelocationLock::RelocationLock(Heap* heap) : heap_(heap) { |
7967 if (FLAG_concurrent_recompilation) { | 7968 if (FLAG_concurrent_recompilation) { |
7968 heap_->relocation_mutex_->Lock(); | 7969 heap_->relocation_mutex_->Lock(); |
7969 #ifdef DEBUG | 7970 #ifdef DEBUG |
7970 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 7971 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
7971 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 7972 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
7972 #endif // DEBUG | 7973 #endif // DEBUG |
7973 } | 7974 } |
7974 } | 7975 } |
7975 | 7976 |
7976 } } // namespace v8::internal | 7977 } } // namespace v8::internal |
OLD | NEW |