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

Side by Side Diff: src/mark-compact.cc

Issue 26166004: Get rid of HEAP_PROFILE macro (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-profiler.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 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 2741 matching lines...) Expand 10 before | Expand all | Expand 10 after
2752 // The second pass updates pointers to new space in all spaces. It is possible 2752 // The second pass updates pointers to new space in all spaces. It is possible
2753 // to encounter pointers to dead new space objects during traversal of pointers 2753 // to encounter pointers to dead new space objects during traversal of pointers
2754 // to new space. We should clear them to avoid encountering them during next 2754 // to new space. We should clear them to avoid encountering them during next
2755 // pointer iteration. This is an issue if the store buffer overflows and we 2755 // pointer iteration. This is an issue if the store buffer overflows and we
2756 // have to scan the entire old space, including dead objects, looking for 2756 // have to scan the entire old space, including dead objects, looking for
2757 // pointers to new space. 2757 // pointers to new space.
2758 void MarkCompactCollector::MigrateObject(Address dst, 2758 void MarkCompactCollector::MigrateObject(Address dst,
2759 Address src, 2759 Address src,
2760 int size, 2760 int size,
2761 AllocationSpace dest) { 2761 AllocationSpace dest) {
2762 HEAP_PROFILE(heap(), ObjectMoveEvent(src, dst, size)); 2762 HeapProfiler* heap_profiler = heap()->isolate()->heap_profiler();
2763 if (heap_profiler->is_profiling()) {
2764 heap_profiler->ObjectMoveEvent(src, dst, size);
2765 }
2763 ASSERT(heap()->AllowedToBeMigrated(HeapObject::FromAddress(src), dest)); 2766 ASSERT(heap()->AllowedToBeMigrated(HeapObject::FromAddress(src), dest));
2764 ASSERT(dest != LO_SPACE && size <= Page::kMaxNonCodeHeapObjectSize); 2767 ASSERT(dest != LO_SPACE && size <= Page::kMaxNonCodeHeapObjectSize);
2765 if (dest == OLD_POINTER_SPACE) { 2768 if (dest == OLD_POINTER_SPACE) {
2766 Address src_slot = src; 2769 Address src_slot = src;
2767 Address dst_slot = dst; 2770 Address dst_slot = dst;
2768 ASSERT(IsAligned(size, kPointerSize)); 2771 ASSERT(IsAligned(size, kPointerSize));
2769 2772
2770 for (int remaining = size / kPointerSize; remaining > 0; remaining--) { 2773 for (int remaining = size / kPointerSize; remaining > 0; remaining--) {
2771 Object* value = Memory::Object_at(src_slot); 2774 Object* value = Memory::Object_at(src_slot);
2772 2775
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
4356 while (buffer != NULL) { 4359 while (buffer != NULL) {
4357 SlotsBuffer* next_buffer = buffer->next(); 4360 SlotsBuffer* next_buffer = buffer->next();
4358 DeallocateBuffer(buffer); 4361 DeallocateBuffer(buffer);
4359 buffer = next_buffer; 4362 buffer = next_buffer;
4360 } 4363 }
4361 *buffer_address = NULL; 4364 *buffer_address = NULL;
4362 } 4365 }
4363 4366
4364 4367
4365 } } // namespace v8::internal 4368 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-profiler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698