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

Side by Side Diff: src/heap.cc

Issue 95283003: Do not put allocated block into HeapObjectsMap (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reupload take 3 Created 7 years 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/builtins.cc ('k') | src/heap-inl.h » ('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 4867 matching lines...) Expand 10 before | Expand all | Expand 10 after
4878 // Since we know the clone is allocated in new space, we can copy 4878 // Since we know the clone is allocated in new space, we can copy
4879 // the contents without worrying about updating the write barrier. 4879 // the contents without worrying about updating the write barrier.
4880 CopyBlock(HeapObject::cast(clone)->address(), 4880 CopyBlock(HeapObject::cast(clone)->address(),
4881 source->address(), 4881 source->address(),
4882 object_size); 4882 object_size);
4883 4883
4884 if (site != NULL) { 4884 if (site != NULL) {
4885 AllocationMemento* alloc_memento = reinterpret_cast<AllocationMemento*>( 4885 AllocationMemento* alloc_memento = reinterpret_cast<AllocationMemento*>(
4886 reinterpret_cast<Address>(clone) + object_size); 4886 reinterpret_cast<Address>(clone) + object_size);
4887 InitializeAllocationMemento(alloc_memento, site); 4887 InitializeAllocationMemento(alloc_memento, site);
4888 HeapProfiler* profiler = isolate()->heap_profiler();
4889 if (profiler->is_tracking_allocations()) {
4890 profiler->UpdateObjectSizeEvent(HeapObject::cast(clone)->address(),
4891 object_size);
4892 profiler->NewObjectEvent(alloc_memento->address(),
4893 AllocationMemento::kSize);
4894 }
4895 } 4888 }
4896 } 4889 }
4897 4890
4898 SLOW_ASSERT( 4891 SLOW_ASSERT(
4899 JSObject::cast(clone)->GetElementsKind() == source->GetElementsKind()); 4892 JSObject::cast(clone)->GetElementsKind() == source->GetElementsKind());
4900 FixedArrayBase* elements = FixedArrayBase::cast(source->elements()); 4893 FixedArrayBase* elements = FixedArrayBase::cast(source->elements());
4901 FixedArray* properties = FixedArray::cast(source->properties()); 4894 FixedArray* properties = FixedArray::cast(source->properties());
4902 // Update elements if necessary. 4895 // Update elements if necessary.
4903 if (elements->length() > 0) { 4896 if (elements->length() > 0) {
4904 Object* elem; 4897 Object* elem;
(...skipping 3090 matching lines...) Expand 10 before | Expand all | Expand 10 after
7995 static_cast<int>(object_sizes_last_time_[index])); 7988 static_cast<int>(object_sizes_last_time_[index]));
7996 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7989 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7997 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7990 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7998 7991
7999 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7992 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
8000 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7993 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
8001 ClearObjectStats(); 7994 ClearObjectStats();
8002 } 7995 }
8003 7996
8004 } } // namespace v8::internal 7997 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698