From 17dca16df307685535aaf1a69720e91b7439a7c3 Mon Sep 17 00:00:00 2001 From: machenbach Date: Mon, 4 May 2015 09:47:51 -0700 Subject: [PATCH] Revert of Revert of [turbofan] Small fixes to PipelineStatistics. Collect statistics in tests. (patchset #1 id:1 of https://codereview.chromium.org/1119963003/) Reason for revert: Revert didn't fix the problem. Maybe it was another CL. Original issue's description: > Revert of [turbofan] Small fixes to PipelineStatistics. Collect statistics in tests. (patchset #1 id:1 of https://codereview.chromium.org/1122753002/) > > Reason for revert: > [Sheriff] Speculative revert for breaking arm64 nosnap: > http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug%20-%202/builds/2314 > > Original issue's description: > > [turbofan] Small fixes to PipelineStatistics. Collect statistics in tests. > > > > R=bmeurer@chromium.org > > BUG= > > > > Committed: https://crrev.com/9833844268357590243732a53e2a7fc0dc5fcc9e > > Cr-Commit-Position: refs/heads/master@{#28192} > > TBR=bmeurer@chromium.org,titzer@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG= > > Committed: https://crrev.com/d0ed8940fc6c995eba57149b8e8cb214001e8381 > Cr-Commit-Position: refs/heads/master@{#28205} TBR=bmeurer@chromium.org,titzer@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/1126603002 Cr-Commit-Position: refs/heads/master@{#28207} --- src/compiler/pipeline-statistics.cc | 2 +- src/compiler/pipeline.cc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/compiler/pipeline-statistics.cc b/src/compiler/pipeline-statistics.cc index 0203a35872..5e8d1272cf 100644 --- a/src/compiler/pipeline-statistics.cc +++ b/src/compiler/pipeline-statistics.cc @@ -50,7 +50,7 @@ PipelineStatistics::PipelineStatistics(CompilationInfo* info, source_size_(0), phase_kind_name_(NULL), phase_name_(NULL) { - if (!info->shared_info().is_null()) { + if (info->has_shared_info()) { source_size_ = static_cast(info->shared_info()->SourceSize()); SmartArrayPointer name = info->shared_info()->DebugName()->ToCString(); diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc index fd8843fea6..5e51c454cd 100644 --- a/src/compiler/pipeline.cc +++ b/src/compiler/pipeline.cc @@ -1139,6 +1139,12 @@ Handle Pipeline::GenerateCodeForTesting(CompilationInfo* info, // Construct a pipeline for scheduling and code generation. ZonePool zone_pool; PipelineData data(&zone_pool, info, graph, schedule); + SmartPointer pipeline_statistics; + if (FLAG_turbo_stats) { + pipeline_statistics.Reset(new PipelineStatistics(info, &zone_pool)); + pipeline_statistics->BeginPhaseKind("test codegen"); + } + Pipeline pipeline(info); pipeline.data_ = &data; if (data.schedule() == nullptr) {