Reviewers: Benedikt Meurer,
Description:
[turbofan] Small fixes to PipelineStatistics. Collect statistics in tests.
[email protected]
BUG=
Please review this at https://codereview.chromium.org/1122753002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+7, -1 lines):
M src/compiler/pipeline.cc
M src/compiler/pipeline-statistics.cc
Index: src/compiler/pipeline-statistics.cc
diff --git a/src/compiler/pipeline-statistics.cc
b/src/compiler/pipeline-statistics.cc
index
0203a3587259fce6404def1455113fc3cb3e4cd9..5e8d1272cf62867d67d89d1691be82e1616314ac
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<size_t>(info->shared_info()->SourceSize());
SmartArrayPointer<char> name =
info->shared_info()->DebugName()->ToCString();
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index
fd8843fea69be49530c1d4caed02634fae40acf0..5e51c454cda8b73d296b443015f17a472b88c2e2
100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -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) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.