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

Side by Side Diff: src/frames.cc

Issue 6639024: Get rid of distinction between below- and above-watermark in page allocation.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 ASSERT(code != NULL && code->contains(pc)); 1119 ASSERT(code != NULL && code->contains(pc));
1120 return code; 1120 return code;
1121 } 1121 }
1122 1122
1123 1123
1124 Code* PcToCodeCache::GcSafeFindCodeForPc(Address pc) { 1124 Code* PcToCodeCache::GcSafeFindCodeForPc(Address pc) {
1125 // Check if the pc points into a large object chunk. 1125 // Check if the pc points into a large object chunk.
1126 LargePage* large_page = Heap::lo_space()->FindPageContainingPc(pc); 1126 LargePage* large_page = Heap::lo_space()->FindPageContainingPc(pc);
1127 if (large_page != NULL) return GcSafeCastToCode(large_page->GetObject(), pc); 1127 if (large_page != NULL) return GcSafeCastToCode(large_page->GetObject(), pc);
1128 1128
1129 // Iterate through the 8K page until we reach the end or find an 1129 // Iterate through the page until we reach the end or find an object starting
1130 // object starting after the pc. 1130 // after the pc.
1131 Page* page = Page::FromAddress(pc); 1131 Page* page = Page::FromAddress(pc);
1132 HeapObjectIterator iterator(page, Heap::GcSafeSizeOfOldObjectFunction()); 1132 HeapObjectIterator iterator(page, Heap::GcSafeSizeOfOldObjectFunction());
1133 HeapObject* previous = NULL; 1133 HeapObject* previous = NULL;
1134 while (true) { 1134 while (true) {
1135 HeapObject* next = iterator.next(); 1135 HeapObject* next = iterator.Next();
1136 if (next == NULL || next->address() >= pc) { 1136 if (next == NULL || next->address() >= pc) {
1137 return GcSafeCastToCode(previous, pc); 1137 return GcSafeCastToCode(previous, pc);
1138 } 1138 }
1139 previous = next; 1139 previous = next;
1140 } 1140 }
1141 } 1141 }
1142 1142
1143 1143
1144 PcToCodeCache::PcToCodeCacheEntry* PcToCodeCache::GetCacheEntry(Address pc) { 1144 PcToCodeCache::PcToCodeCacheEntry* PcToCodeCache::GetCacheEntry(Address pc) {
1145 Counters::pc_to_code.Increment(); 1145 Counters::pc_to_code.Increment();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 ZoneList<StackFrame*> list(10); 1223 ZoneList<StackFrame*> list(10);
1224 for (StackFrameIterator it; !it.done(); it.Advance()) { 1224 for (StackFrameIterator it; !it.done(); it.Advance()) {
1225 StackFrame* frame = AllocateFrameCopy(it.frame()); 1225 StackFrame* frame = AllocateFrameCopy(it.frame());
1226 list.Add(frame); 1226 list.Add(frame);
1227 } 1227 }
1228 return list.ToVector(); 1228 return list.ToVector();
1229 } 1229 }
1230 1230
1231 1231
1232 } } // namespace v8::internal 1232 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698