Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(818)

Side by Side Diff: src/heap.cc

Issue 26179004: Add code age subtype tracking to --track-gc-object-stats (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.h ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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) \
7941 index = FIRST_CODE_AGE_SUB_TYPE + Code::k##name##CodeAge; \
7942 counters->count_of_CODE_AGE_##name()->Increment( \
7943 static_cast<int>(object_counts_[index])); \
7944 counters->count_of_CODE_AGE_##name()->Decrement( \
7945 static_cast<int>(object_counts_last_time_[index])); \
7946 counters->size_of_CODE_AGE_##name()->Increment( \
7947 static_cast<int>(object_sizes_[index])); \
7948 counters->size_of_CODE_AGE_##name()->Decrement( \
7949 static_cast<int>(object_sizes_last_time_[index]));
7950 CODE_AGE_LIST_WITH_NO_AGE(ADJUST_LAST_TIME_OBJECT_COUNT)
7951 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7940 7952
7941 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7953 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7942 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7954 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7943 ClearObjectStats(); 7955 ClearObjectStats();
7944 } 7956 }
7945 7957
7946 7958
7947 Heap::RelocationLock::RelocationLock(Heap* heap) : heap_(heap) { 7959 Heap::RelocationLock::RelocationLock(Heap* heap) : heap_(heap) {
7948 if (FLAG_concurrent_recompilation) { 7960 if (FLAG_concurrent_recompilation) {
7949 heap_->relocation_mutex_->Lock(); 7961 heap_->relocation_mutex_->Lock();
7950 #ifdef DEBUG 7962 #ifdef DEBUG
7951 heap_->relocation_mutex_locked_by_optimizer_thread_ = 7963 heap_->relocation_mutex_locked_by_optimizer_thread_ =
7952 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); 7964 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread();
7953 #endif // DEBUG 7965 #endif // DEBUG
7954 } 7966 }
7955 } 7967 }
7956 7968
7957 } } // namespace v8::internal 7969 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698