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

Side by Side Diff: src/runtime.cc

Issue 9608006: Add kAbortIncrementalMarkingMask flag for GC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Ulan Degenbaev. Created 8 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 | « src/mark-compact-inl.h ('k') | test/cctest/test-api.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 12907 matching lines...) Expand 10 before | Expand all | Expand 10 after
12918 SmartArrayPointer<char> flags = 12918 SmartArrayPointer<char> flags =
12919 arg->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); 12919 arg->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
12920 FlagList::SetFlagsFromString(*flags, StrLength(*flags)); 12920 FlagList::SetFlagsFromString(*flags, StrLength(*flags));
12921 return isolate->heap()->undefined_value(); 12921 return isolate->heap()->undefined_value();
12922 } 12922 }
12923 12923
12924 12924
12925 // Performs a GC. 12925 // Performs a GC.
12926 // Presently, it only does a full GC. 12926 // Presently, it only does a full GC.
12927 RUNTIME_FUNCTION(MaybeObject*, Runtime_CollectGarbage) { 12927 RUNTIME_FUNCTION(MaybeObject*, Runtime_CollectGarbage) {
12928 isolate->heap()->CollectAllGarbage(true, "%CollectGarbage"); 12928 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, "%CollectGarbage");
12929 return isolate->heap()->undefined_value(); 12929 return isolate->heap()->undefined_value();
12930 } 12930 }
12931 12931
12932 12932
12933 // Gets the current heap usage. 12933 // Gets the current heap usage.
12934 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetHeapUsage) { 12934 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetHeapUsage) {
12935 int usage = static_cast<int>(isolate->heap()->SizeOfObjects()); 12935 int usage = static_cast<int>(isolate->heap()->SizeOfObjects());
12936 if (!Smi::IsValid(usage)) { 12936 if (!Smi::IsValid(usage)) {
12937 return *isolate->factory()->NewNumberFromInt(usage); 12937 return *isolate->factory()->NewNumberFromInt(usage);
12938 } 12938 }
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
13645 // Handle last resort GC and make sure to allow future allocations 13645 // Handle last resort GC and make sure to allow future allocations
13646 // to grow the heap without causing GCs (if possible). 13646 // to grow the heap without causing GCs (if possible).
13647 isolate->counters()->gc_last_resort_from_js()->Increment(); 13647 isolate->counters()->gc_last_resort_from_js()->Increment();
13648 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13648 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13649 "Runtime::PerformGC"); 13649 "Runtime::PerformGC");
13650 } 13650 }
13651 } 13651 }
13652 13652
13653 13653
13654 } } // namespace v8::internal 13654 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact-inl.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698