Commit 98338442 authored by titzer's avatar titzer Committed by Commit bot

[turbofan] Small fixes to PipelineStatistics. Collect statistics in tests.

R=bmeurer@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1122753002

Cr-Commit-Position: refs/heads/master@{#28192}
parent acdb5336
......@@ -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<size_t>(info->shared_info()->SourceSize());
SmartArrayPointer<char> name =
info->shared_info()->DebugName()->ToCString();
......
......@@ -1139,6 +1139,12 @@ Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info,
// Construct a pipeline for scheduling and code generation.
ZonePool zone_pool;
PipelineData data(&zone_pool, info, graph, schedule);
SmartPointer<PipelineStatistics> 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) {
......
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