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

Side by Side Diff: src/heap.cc

Issue 203523009: Access old space marking bits from runtime only when incremental marking is in MARKING state. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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
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 3951 matching lines...) Expand 10 before | Expand all | Expand 10 after
3962 filler->set_map_no_write_barrier(one_pointer_filler_map()); 3962 filler->set_map_no_write_barrier(one_pointer_filler_map());
3963 } else if (size == 2 * kPointerSize) { 3963 } else if (size == 2 * kPointerSize) {
3964 filler->set_map_no_write_barrier(two_pointer_filler_map()); 3964 filler->set_map_no_write_barrier(two_pointer_filler_map());
3965 } else { 3965 } else {
3966 filler->set_map_no_write_barrier(free_space_map()); 3966 filler->set_map_no_write_barrier(free_space_map());
3967 FreeSpace::cast(filler)->set_size(size); 3967 FreeSpace::cast(filler)->set_size(size);
3968 } 3968 }
3969 } 3969 }
3970 3970
3971 3971
3972 void Heap::AdjustLiveBytes(Address address, int by, InvocationMode mode) {
3973 if (incremental_marking()->IsMarking() &&
3974 Marking::IsBlack(Marking::MarkBitFrom(address))) {
3975 if (mode == FROM_GC) {
3976 MemoryChunk::IncrementLiveBytesFromGC(address, by);
3977 } else {
3978 MemoryChunk::IncrementLiveBytesFromMutator(address, by);
3979 }
3980 }
3981 }
3982
3983
3972 MaybeObject* Heap::AllocateExternalArray(int length, 3984 MaybeObject* Heap::AllocateExternalArray(int length,
3973 ExternalArrayType array_type, 3985 ExternalArrayType array_type,
3974 void* external_pointer, 3986 void* external_pointer,
3975 PretenureFlag pretenure) { 3987 PretenureFlag pretenure) {
3976 int size = ExternalArray::kAlignedSize; 3988 int size = ExternalArray::kAlignedSize;
3977 AllocationSpace space = SelectSpace(size, OLD_DATA_SPACE, pretenure); 3989 AllocationSpace space = SelectSpace(size, OLD_DATA_SPACE, pretenure);
3978 Object* result; 3990 Object* result;
3979 { MaybeObject* maybe_result = AllocateRaw(size, space, OLD_DATA_SPACE); 3991 { MaybeObject* maybe_result = AllocateRaw(size, space, OLD_DATA_SPACE);
3980 if (!maybe_result->ToObject(&result)) return maybe_result; 3992 if (!maybe_result->ToObject(&result)) return maybe_result;
3981 } 3993 }
(...skipping 3768 matching lines...) Expand 10 before | Expand all | Expand 10 after
7750 static_cast<int>(object_sizes_last_time_[index])); 7762 static_cast<int>(object_sizes_last_time_[index]));
7751 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7763 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7752 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7764 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7753 7765
7754 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7766 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7755 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7767 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7756 ClearObjectStats(); 7768 ClearObjectStats();
7757 } 7769 }
7758 7770
7759 } } // namespace v8::internal 7771 } } // namespace v8::internal
OLDNEW
« src/builtins.cc ('K') | « src/heap.h ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698