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

Side by Side Diff: src/api.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
« no previous file with comments | « include/v8.h ('k') | src/debug.cc » ('j') | src/spaces-inl.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 3370 matching lines...) Expand 10 before | Expand all | Expand 10 after
3381 bool v8::V8::IdleNotification() { 3381 bool v8::V8::IdleNotification() {
3382 // Returning true tells the caller that it need not 3382 // Returning true tells the caller that it need not
3383 // continue to call IdleNotification. 3383 // continue to call IdleNotification.
3384 if (!i::V8::IsRunning()) return true; 3384 if (!i::V8::IsRunning()) return true;
3385 return i::V8::IdleNotification(); 3385 return i::V8::IdleNotification();
3386 } 3386 }
3387 3387
3388 3388
3389 void v8::V8::LowMemoryNotification() { 3389 void v8::V8::LowMemoryNotification() {
3390 if (!i::V8::IsRunning()) return; 3390 if (!i::V8::IsRunning()) return;
3391 i::Heap::CollectAllGarbage(true); 3391 i::Heap::CollectAllGarbage(i::Heap::kForceCompactionMask);
3392 } 3392 }
3393 3393
3394 3394
3395 int v8::V8::ContextDisposedNotification() { 3395 int v8::V8::ContextDisposedNotification() {
3396 if (!i::V8::IsRunning()) return 0; 3396 if (!i::V8::IsRunning()) return 0;
3397 return i::Heap::NotifyContextDisposed(); 3397 return i::Heap::NotifyContextDisposed();
3398 } 3398 }
3399 3399
3400 3400
3401 const char* v8::V8::GetVersion() { 3401 const char* v8::V8::GetVersion() {
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
4213 4213
4214 4214
4215 void V8::ResumeProfilerEx(int flags, int tag) { 4215 void V8::ResumeProfilerEx(int flags, int tag) {
4216 #ifdef ENABLE_LOGGING_AND_PROFILING 4216 #ifdef ENABLE_LOGGING_AND_PROFILING
4217 if (flags & PROFILER_MODULE_HEAP_SNAPSHOT) { 4217 if (flags & PROFILER_MODULE_HEAP_SNAPSHOT) {
4218 // Snapshot mode: resume modules, perform GC, then pause only 4218 // Snapshot mode: resume modules, perform GC, then pause only
4219 // those modules which haven't been started prior to making a 4219 // those modules which haven't been started prior to making a
4220 // snapshot. 4220 // snapshot.
4221 4221
4222 // Make a GC prior to taking a snapshot. 4222 // Make a GC prior to taking a snapshot.
4223 i::Heap::CollectAllGarbage(false); 4223 i::Heap::CollectAllGarbage(i::Heap::kNoGCFlags);
4224 // Reset snapshot flag and CPU module flags. 4224 // Reset snapshot flag and CPU module flags.
4225 flags &= ~(PROFILER_MODULE_HEAP_SNAPSHOT | PROFILER_MODULE_CPU); 4225 flags &= ~(PROFILER_MODULE_HEAP_SNAPSHOT | PROFILER_MODULE_CPU);
4226 const int current_flags = i::Logger::GetActiveProfilerModules(); 4226 const int current_flags = i::Logger::GetActiveProfilerModules();
4227 i::Logger::ResumeProfiler(flags, tag); 4227 i::Logger::ResumeProfiler(flags, tag);
4228 i::Heap::CollectAllGarbage(false); 4228 i::Heap::CollectAllGarbage(i::Heap::kNoGCFlags);
4229 i::Logger::PauseProfiler(~current_flags & flags, tag); 4229 i::Logger::PauseProfiler(~current_flags & flags, tag);
4230 } else { 4230 } else {
4231 i::Logger::ResumeProfiler(flags, tag); 4231 i::Logger::ResumeProfiler(flags, tag);
4232 } 4232 }
4233 #endif 4233 #endif
4234 } 4234 }
4235 4235
4236 4236
4237 void V8::PauseProfilerEx(int flags, int tag) { 4237 void V8::PauseProfilerEx(int flags, int tag) {
4238 #ifdef ENABLE_LOGGING_AND_PROFILING 4238 #ifdef ENABLE_LOGGING_AND_PROFILING
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
5224 5224
5225 5225
5226 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 5226 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
5227 HandleScopeImplementer* thread_local = 5227 HandleScopeImplementer* thread_local =
5228 reinterpret_cast<HandleScopeImplementer*>(storage); 5228 reinterpret_cast<HandleScopeImplementer*>(storage);
5229 thread_local->IterateThis(v); 5229 thread_local->IterateThis(v);
5230 return storage + ArchiveSpacePerThread(); 5230 return storage + ArchiveSpacePerThread();
5231 } 5231 }
5232 5232
5233 } } // namespace v8::internal 5233 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/debug.cc » ('j') | src/spaces-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698