Commit ec16aa9a authored by antonm@chromium.org's avatar antonm@chromium.org

Do not optimize functions which are in new space.

If there are many shortliving closures, they pollute sampler window and
delay optimizations of functions which should be optimized.

Review URL: http://codereview.chromium.org/6344006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c919bb7d
...@@ -134,6 +134,7 @@ void PendingListNode::WeakCallback(v8::Persistent<v8::Value>, void* data) { ...@@ -134,6 +134,7 @@ void PendingListNode::WeakCallback(v8::Persistent<v8::Value>, void* data) {
static bool IsOptimizable(JSFunction* function) { static bool IsOptimizable(JSFunction* function) {
if (Heap::InNewSpace(function)) return false;
Code* code = function->code(); Code* code = function->code();
return code->kind() == Code::FUNCTION && code->optimizable(); return code->kind() == Code::FUNCTION && code->optimizable();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment