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

Side by Side Diff: src/api.cc

Issue 8519002: Start incremental marking on idle notification. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments, tuned idle round starting conditions. Created 9 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 | « include/v8.h ('k') | src/heap.h » ('j') | src/heap.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3985 matching lines...) Expand 10 before | Expand all | Expand 10 after
3996 3996
3997 i::Heap* heap = i::Isolate::Current()->heap(); 3997 i::Heap* heap = i::Isolate::Current()->heap();
3998 heap_statistics->set_total_heap_size(heap->CommittedMemory()); 3998 heap_statistics->set_total_heap_size(heap->CommittedMemory());
3999 heap_statistics->set_total_heap_size_executable( 3999 heap_statistics->set_total_heap_size_executable(
4000 heap->CommittedMemoryExecutable()); 4000 heap->CommittedMemoryExecutable());
4001 heap_statistics->set_used_heap_size(heap->SizeOfObjects()); 4001 heap_statistics->set_used_heap_size(heap->SizeOfObjects());
4002 heap_statistics->set_heap_size_limit(heap->MaxReserved()); 4002 heap_statistics->set_heap_size_limit(heap->MaxReserved());
4003 } 4003 }
4004 4004
4005 4005
4006 bool v8::V8::IdleNotification() { 4006 bool v8::V8::IdleNotification(int hint) {
4007 // Returning true tells the caller that it need not 4007 // Returning true tells the caller that it need not
4008 // continue to call IdleNotification. 4008 // continue to call IdleNotification.
4009 i::Isolate* isolate = i::Isolate::Current(); 4009 i::Isolate* isolate = i::Isolate::Current();
4010 if (isolate == NULL || !isolate->IsInitialized()) return true; 4010 if (isolate == NULL || !isolate->IsInitialized()) return true;
4011 return i::V8::IdleNotification(); 4011 return i::V8::IdleNotification(hint);
4012 } 4012 }
4013 4013
4014 4014
4015 void v8::V8::LowMemoryNotification() { 4015 void v8::V8::LowMemoryNotification() {
4016 i::Isolate* isolate = i::Isolate::Current(); 4016 i::Isolate* isolate = i::Isolate::Current();
4017 if (isolate == NULL || !isolate->IsInitialized()) return; 4017 if (isolate == NULL || !isolate->IsInitialized()) return;
4018 isolate->heap()->CollectAllAvailableGarbage(); 4018 isolate->heap()->CollectAllAvailableGarbage();
4019 } 4019 }
4020 4020
4021 4021
(...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after
6100 6100
6101 6101
6102 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6102 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6103 HandleScopeImplementer* scope_implementer = 6103 HandleScopeImplementer* scope_implementer =
6104 reinterpret_cast<HandleScopeImplementer*>(storage); 6104 reinterpret_cast<HandleScopeImplementer*>(storage);
6105 scope_implementer->IterateThis(v); 6105 scope_implementer->IterateThis(v);
6106 return storage + ArchiveSpacePerThread(); 6106 return storage + ArchiveSpacePerThread();
6107 } 6107 }
6108 6108
6109 } } // namespace v8::internal 6109 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/heap.h » ('j') | src/heap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698