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

Side by Side Diff: src/heap-inl.h

Issue 25655004: Print out how many AllocationMementos were found during mark-sweep. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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.cc ('k') | src/mark-compact.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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 518
519 // If the first word is a forwarding address, the object has already been 519 // If the first word is a forwarding address, the object has already been
520 // copied. 520 // copied.
521 if (first_word.IsForwardingAddress()) { 521 if (first_word.IsForwardingAddress()) {
522 HeapObject* dest = first_word.ToForwardingAddress(); 522 HeapObject* dest = first_word.ToForwardingAddress();
523 ASSERT(object->GetIsolate()->heap()->InFromSpace(*p)); 523 ASSERT(object->GetIsolate()->heap()->InFromSpace(*p));
524 *p = dest; 524 *p = dest;
525 return; 525 return;
526 } 526 }
527 527
528 if (FLAG_trace_track_allocation_sites && 528 if (FLAG_trace_track_allocation_sites && object->IsJSObject()) {
529 AllocationSite::CanTrack(object->map()->instance_type()) && 529 if (AllocationMemento::FindForJSObject(JSObject::cast(object), true) !=
530 object->IsJSObject()) { 530 NULL) {
531 if (AllocationMemento::FindForJSObject(JSObject::cast(object)) != NULL) { 531 object->GetIsolate()->heap()->allocation_mementos_found_++;
532 object->GetIsolate()->heap()->allocation_mementos_found_on_scavenge_++;
533 } 532 }
534 } 533 }
535 534
536 // AllocationMementos are unrooted and shouldn't survive a scavenge 535 // AllocationMementos are unrooted and shouldn't survive a scavenge
537 ASSERT(object->map() != object->GetHeap()->allocation_memento_map()); 536 ASSERT(object->map() != object->GetHeap()->allocation_memento_map());
538 // Call the slow part of scavenge object. 537 // Call the slow part of scavenge object.
539 return ScavengeObjectSlow(p, object); 538 return ScavengeObjectSlow(p, object);
540 } 539 }
541 540
542 541
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 #ifdef DEBUG 888 #ifdef DEBUG
890 Isolate* isolate = Isolate::Current(); 889 Isolate* isolate = Isolate::Current();
891 isolate->heap()->disallow_allocation_failure_ = old_state_; 890 isolate->heap()->disallow_allocation_failure_ = old_state_;
892 #endif 891 #endif
893 } 892 }
894 893
895 894
896 } } // namespace v8::internal 895 } } // namespace v8::internal
897 896
898 #endif // V8_HEAP_INL_H_ 897 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698