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

Side by Side Diff: src/runtime.cc

Issue 7274024: Suspend runtime profiler as soon as we exit JS. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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 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 7786 matching lines...) Expand 10 before | Expand all | Expand 10 after
7797 arguments = Handle<Object>( 7797 arguments = Handle<Object>(
7798 Accessors::FunctionGetArguments(*function, 7798 Accessors::FunctionGetArguments(*function,
7799 NULL)->ToObjectUnchecked()); 7799 NULL)->ToObjectUnchecked());
7800 ASSERT(*arguments != isolate->heap()->null_value()); 7800 ASSERT(*arguments != isolate->heap()->null_value());
7801 ASSERT(*arguments != isolate->heap()->undefined_value()); 7801 ASSERT(*arguments != isolate->heap()->undefined_value());
7802 } 7802 }
7803 frame->SetExpression(i, *arguments); 7803 frame->SetExpression(i, *arguments);
7804 } 7804 }
7805 } 7805 }
7806 7806
7807 isolate->compilation_cache()->MarkForLazyOptimizing(function);
7808 if (type == Deoptimizer::EAGER) { 7807 if (type == Deoptimizer::EAGER) {
7809 RUNTIME_ASSERT(function->IsOptimized()); 7808 RUNTIME_ASSERT(function->IsOptimized());
7810 } else { 7809 } else {
7811 RUNTIME_ASSERT(!function->IsOptimized()); 7810 RUNTIME_ASSERT(!function->IsOptimized());
7812 } 7811 }
7813 7812
7814 // Avoid doing too much work when running with --always-opt and keep 7813 // Avoid doing too much work when running with --always-opt and keep
7815 // the optimized code around. 7814 // the optimized code around.
7816 if (FLAG_always_opt || type == Deoptimizer::LAZY) { 7815 if (FLAG_always_opt || type == Deoptimizer::LAZY) {
7817 return isolate->heap()->undefined_value(); 7816 return isolate->heap()->undefined_value();
(...skipping 4663 matching lines...) Expand 10 before | Expand all | Expand 10 after
12481 } else { 12480 } else {
12482 // Handle last resort GC and make sure to allow future allocations 12481 // Handle last resort GC and make sure to allow future allocations
12483 // to grow the heap without causing GCs (if possible). 12482 // to grow the heap without causing GCs (if possible).
12484 isolate->counters()->gc_last_resort_from_js()->Increment(); 12483 isolate->counters()->gc_last_resort_from_js()->Increment();
12485 isolate->heap()->CollectAllGarbage(false); 12484 isolate->heap()->CollectAllGarbage(false);
12486 } 12485 }
12487 } 12486 }
12488 12487
12489 12488
12490 } } // namespace v8::internal 12489 } } // namespace v8::internal
OLDNEW
« src/compilation-cache.cc ('K') | « src/isolate.cc ('k') | src/runtime-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698