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
This commit is contained in:
jkummerow@chromium.org 2012-02-22 10:48:58 +00:00
parent f736f0a600
commit 4e0091bebb
5 changed files with 6 additions and 17 deletions

View File

@ -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());
} }

View File

@ -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) {
} }
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.

View File

@ -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());
} }

View File

@ -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());
} }

View File

@ -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());
} }