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

Side by Side Diff: src/objects.cc

Issue 25273002: Print out how many AllocationMementos were found on a scavenge of new space (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments 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-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 9039 matching lines...) Expand 10 before | Expand all | Expand 10 after
9050 return string; 9050 return string;
9051 } 9051 }
9052 9052
9053 9053
9054 AllocationMemento* AllocationMemento::FindForJSObject(JSObject* object) { 9054 AllocationMemento* AllocationMemento::FindForJSObject(JSObject* object) {
9055 // Currently, AllocationMemento objects are only allocated immediately 9055 // Currently, AllocationMemento objects are only allocated immediately
9056 // after JSArrays in NewSpace, and detecting whether a JSArray has one 9056 // after JSArrays in NewSpace, and detecting whether a JSArray has one
9057 // involves carefully checking the object immediately after the JSArray 9057 // involves carefully checking the object immediately after the JSArray
9058 // (if there is one) to see if it's an AllocationMemento. 9058 // (if there is one) to see if it's an AllocationMemento.
9059 if (FLAG_track_allocation_sites && object->GetHeap()->InNewSpace(object)) { 9059 if (FLAG_track_allocation_sites && object->GetHeap()->InNewSpace(object)) {
9060 ASSERT(object->GetHeap()->InToSpace(object));
9061 Address ptr_end = (reinterpret_cast<Address>(object) - kHeapObjectTag) + 9060 Address ptr_end = (reinterpret_cast<Address>(object) - kHeapObjectTag) +
9062 object->Size(); 9061 object->Size();
9063 if ((ptr_end + AllocationMemento::kSize) <= 9062 if ((ptr_end + AllocationMemento::kSize) <=
9064 object->GetHeap()->NewSpaceTop()) { 9063 object->GetHeap()->NewSpaceTop()) {
9065 // There is room in newspace for allocation info. Do we have some? 9064 // There is room in newspace for allocation info. Do we have some?
9066 Map** possible_allocation_memento_map = 9065 Map** possible_allocation_memento_map =
9067 reinterpret_cast<Map**>(ptr_end); 9066 reinterpret_cast<Map**>(ptr_end);
9068 if (*possible_allocation_memento_map == 9067 if (*possible_allocation_memento_map ==
9069 object->GetHeap()->allocation_memento_map()) { 9068 object->GetHeap()->allocation_memento_map()) {
9070 AllocationMemento* memento = AllocationMemento::cast( 9069 AllocationMemento* memento = AllocationMemento::cast(
(...skipping 7114 matching lines...) Expand 10 before | Expand all | Expand 10 after
16185 #define ERROR_MESSAGES_TEXTS(C, T) T, 16184 #define ERROR_MESSAGES_TEXTS(C, T) T,
16186 static const char* error_messages_[] = { 16185 static const char* error_messages_[] = {
16187 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16186 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16188 }; 16187 };
16189 #undef ERROR_MESSAGES_TEXTS 16188 #undef ERROR_MESSAGES_TEXTS
16190 return error_messages_[reason]; 16189 return error_messages_[reason];
16191 } 16190 }
16192 16191
16193 16192
16194 } } // namespace v8::internal 16193 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698