Profiler experiments: self-optimization for functions containing calls

Review URL: https://chromiumcodereview.appspot.com/9430042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10787 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f736f0a6
...@@ -140,7 +140,7 @@ void FullCodeGenerator::Generate() { ...@@ -140,7 +140,7 @@ void FullCodeGenerator::Generate() {
// We can optionally optimize based on counters rather than statistical // We can optionally optimize based on counters rather than statistical
// sampling. // sampling.
if (info->ShouldSelfOptimize()) { if (info->ShouldSelfOptimize()) {
if (FLAG_trace_opt) { if (FLAG_trace_opt_verbose) {
PrintF("[adding self-optimization header to %s]\n", PrintF("[adding self-optimization header to %s]\n",
*info->function()->debug_name()->ToCString()); *info->function()->debug_name()->ToCString());
} }
......
...@@ -1018,6 +1018,8 @@ INCREASE_NODE_COUNT(CountOperation) ...@@ -1018,6 +1018,8 @@ INCREASE_NODE_COUNT(CountOperation)
INCREASE_NODE_COUNT(BinaryOperation) INCREASE_NODE_COUNT(BinaryOperation)
INCREASE_NODE_COUNT(CompareOperation) INCREASE_NODE_COUNT(CompareOperation)
INCREASE_NODE_COUNT(ThisFunction) INCREASE_NODE_COUNT(ThisFunction)
INCREASE_NODE_COUNT(Call)
INCREASE_NODE_COUNT(CallNew)
#undef INCREASE_NODE_COUNT #undef INCREASE_NODE_COUNT
...@@ -1119,21 +1121,8 @@ void AstConstructionVisitor::VisitArrayLiteral(ArrayLiteral* node) { ...@@ -1119,21 +1121,8 @@ void AstConstructionVisitor::VisitArrayLiteral(ArrayLiteral* node) {
} }
void AstConstructionVisitor::VisitCall(Call* node) {
increase_node_count();
add_flag(kDontSelfOptimize);
}
void AstConstructionVisitor::VisitCallNew(CallNew* node) {
increase_node_count();
add_flag(kDontSelfOptimize);
}
void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) { void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) {
increase_node_count(); increase_node_count();
add_flag(kDontSelfOptimize);
if (node->is_jsruntime()) { if (node->is_jsruntime()) {
// Don't try to inline JS runtime calls because we don't (currently) even // Don't try to inline JS runtime calls because we don't (currently) even
// optimize them. // optimize them.
......
...@@ -132,7 +132,7 @@ void FullCodeGenerator::Generate() { ...@@ -132,7 +132,7 @@ void FullCodeGenerator::Generate() {
// We can optionally optimize based on counters rather than statistical // We can optionally optimize based on counters rather than statistical
// sampling. // sampling.
if (info->ShouldSelfOptimize()) { if (info->ShouldSelfOptimize()) {
if (FLAG_trace_opt) { if (FLAG_trace_opt_verbose) {
PrintF("[adding self-optimization header to %s]\n", PrintF("[adding self-optimization header to %s]\n",
*info->function()->debug_name()->ToCString()); *info->function()->debug_name()->ToCString());
} }
......
...@@ -150,7 +150,7 @@ void FullCodeGenerator::Generate() { ...@@ -150,7 +150,7 @@ void FullCodeGenerator::Generate() {
// We can optionally optimize based on counters rather than statistical // We can optionally optimize based on counters rather than statistical
// sampling. // sampling.
if (info->ShouldSelfOptimize()) { if (info->ShouldSelfOptimize()) {
if (FLAG_trace_opt) { if (FLAG_trace_opt_verbose) {
PrintF("[adding self-optimization header to %s]\n", PrintF("[adding self-optimization header to %s]\n",
*info->function()->debug_name()->ToCString()); *info->function()->debug_name()->ToCString());
} }
......
...@@ -130,7 +130,7 @@ void FullCodeGenerator::Generate() { ...@@ -130,7 +130,7 @@ void FullCodeGenerator::Generate() {
// We can optionally optimize based on counters rather than statistical // We can optionally optimize based on counters rather than statistical
// sampling. // sampling.
if (info->ShouldSelfOptimize()) { if (info->ShouldSelfOptimize()) {
if (FLAG_trace_opt) { if (FLAG_trace_opt_verbose) {
PrintF("[adding self-optimization header to %s]\n", PrintF("[adding self-optimization header to %s]\n",
*info->function()->debug_name()->ToCString()); *info->function()->debug_name()->ToCString());
} }
......
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