Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: src/compiler/pipeline-statistics.cc

Issue 1578723002: [turbofan] Build s/NULL/nullptr/g and CHECK(x != nullptr) to CHECK_NOT_NULL(x). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/pipeline-statistics.h ('k') | src/compiler/ppc/code-generator-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler.h" 5 #include "src/compiler.h"
6 #include "src/compiler/pipeline-statistics.h" 6 #include "src/compiler/pipeline-statistics.h"
7 #include "src/compiler/zone-pool.h" 7 #include "src/compiler/zone-pool.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 18 matching lines...) Expand all
29 DCHECK(!scope_.is_empty()); 29 DCHECK(!scope_.is_empty());
30 diff->function_name_ = pipeline_stats->function_name_; 30 diff->function_name_ = pipeline_stats->function_name_;
31 diff->delta_ = timer_.Elapsed(); 31 diff->delta_ = timer_.Elapsed();
32 size_t outer_zone_diff = 32 size_t outer_zone_diff =
33 pipeline_stats->OuterZoneSize() - outer_zone_initial_size_; 33 pipeline_stats->OuterZoneSize() - outer_zone_initial_size_;
34 diff->max_allocated_bytes_ = outer_zone_diff + scope_->GetMaxAllocatedBytes(); 34 diff->max_allocated_bytes_ = outer_zone_diff + scope_->GetMaxAllocatedBytes();
35 diff->absolute_max_allocated_bytes_ = 35 diff->absolute_max_allocated_bytes_ =
36 diff->max_allocated_bytes_ + allocated_bytes_at_start_; 36 diff->max_allocated_bytes_ + allocated_bytes_at_start_;
37 diff->total_allocated_bytes_ = 37 diff->total_allocated_bytes_ =
38 outer_zone_diff + scope_->GetTotalAllocatedBytes(); 38 outer_zone_diff + scope_->GetTotalAllocatedBytes();
39 scope_.Reset(NULL); 39 scope_.Reset(nullptr);
40 timer_.Stop(); 40 timer_.Stop();
41 } 41 }
42 42
43 43
44 PipelineStatistics::PipelineStatistics(CompilationInfo* info, 44 PipelineStatistics::PipelineStatistics(CompilationInfo* info,
45 ZonePool* zone_pool) 45 ZonePool* zone_pool)
46 : isolate_(info->isolate()), 46 : isolate_(info->isolate()),
47 outer_zone_(info->zone()), 47 outer_zone_(info->zone()),
48 zone_pool_(zone_pool), 48 zone_pool_(zone_pool),
49 compilation_stats_(isolate_->GetTurboStatistics()), 49 compilation_stats_(isolate_->GetTurboStatistics()),
50 source_size_(0), 50 source_size_(0),
51 phase_kind_name_(NULL), 51 phase_kind_name_(nullptr),
52 phase_name_(NULL) { 52 phase_name_(nullptr) {
53 if (info->has_shared_info()) { 53 if (info->has_shared_info()) {
54 source_size_ = static_cast<size_t>(info->shared_info()->SourceSize()); 54 source_size_ = static_cast<size_t>(info->shared_info()->SourceSize());
55 base::SmartArrayPointer<char> name = 55 base::SmartArrayPointer<char> name =
56 info->shared_info()->DebugName()->ToCString(); 56 info->shared_info()->DebugName()->ToCString();
57 function_name_ = name.get(); 57 function_name_ = name.get();
58 } 58 }
59 total_stats_.Begin(this); 59 total_stats_.Begin(this);
60 } 60 }
61 61
62 62
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void PipelineStatistics::EndPhase() { 94 void PipelineStatistics::EndPhase() {
95 DCHECK(InPhaseKind()); 95 DCHECK(InPhaseKind());
96 CompilationStatistics::BasicStats diff; 96 CompilationStatistics::BasicStats diff;
97 phase_stats_.End(this, &diff); 97 phase_stats_.End(this, &diff);
98 compilation_stats_->RecordPhaseStats(phase_kind_name_, phase_name_, diff); 98 compilation_stats_->RecordPhaseStats(phase_kind_name_, phase_name_, diff);
99 } 99 }
100 100
101 } // namespace compiler 101 } // namespace compiler
102 } // namespace internal 102 } // namespace internal
103 } // namespace v8 103 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline-statistics.h ('k') | src/compiler/ppc/code-generator-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698