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