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

Side by Side Diff: src/compiler.h

Issue 1013143003: CpuProfiler: push the collected information about deopts to cpu profiler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: leak was fixed Created 5 years, 9 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 | « no previous file | src/compiler.cc » ('j') | src/profile-generator.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_COMPILER_H_ 5 #ifndef V8_COMPILER_H_
6 #define V8_COMPILER_H_ 6 #define V8_COMPILER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 InlinedFunctionInfo(int parent_id, SourcePosition inline_position, 90 InlinedFunctionInfo(int parent_id, SourcePosition inline_position,
91 int script_id, int start_position) 91 int script_id, int start_position)
92 : parent_id(parent_id), 92 : parent_id(parent_id),
93 inline_position(inline_position), 93 inline_position(inline_position),
94 script_id(script_id), 94 script_id(script_id),
95 start_position(start_position) {} 95 start_position(start_position) {}
96 int parent_id; 96 int parent_id;
97 SourcePosition inline_position; 97 SourcePosition inline_position;
98 int script_id; 98 int script_id;
99 int start_position; 99 int start_position;
100 std::vector<int> deopt_pc_offsets; 100 std::vector<size_t> deopt_pc_offsets;
alph 2015/03/20 08:28:42 Why's the change? AFAICT v8 tends to use 32-bit ty
101 101
102 static const int kNoParentId = -1; 102 static const int kNoParentId = -1;
103 }; 103 };
104 104
105 105
106 // CompilationInfo encapsulates some information known at compile time. It 106 // CompilationInfo encapsulates some information known at compile time. It
107 // is constructed based on the resources available at compile-time. 107 // is constructed based on the resources available at compile-time.
108 class CompilationInfo { 108 class CompilationInfo {
109 public: 109 public:
110 // Various configuration flags for a compilation, as well as some properties 110 // Various configuration flags for a compilation, as well as some properties
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 if (no_frame_ranges_) no_frame_ranges_->Add(OffsetRange(from, to)); 340 if (no_frame_ranges_) no_frame_ranges_->Add(OffsetRange(from, to));
341 } 341 }
342 342
343 List<OffsetRange>* ReleaseNoFrameRanges() { 343 List<OffsetRange>* ReleaseNoFrameRanges() {
344 List<OffsetRange>* result = no_frame_ranges_; 344 List<OffsetRange>* result = no_frame_ranges_;
345 no_frame_ranges_ = NULL; 345 no_frame_ranges_ = NULL;
346 return result; 346 return result;
347 } 347 }
348 348
349 int start_position_for(uint32_t inlining_id) { 349 int start_position_for(uint32_t inlining_id) {
350 return inlined_function_infos_.at(inlining_id).start_position; 350 return inlined_function_infos_->at(inlining_id).start_position;
351 }
352 std::vector<InlinedFunctionInfo>* ReleaseInlinedFunctionInfos() {
353 std::vector<InlinedFunctionInfo>* tmp = inlined_function_infos_;
354 inlined_function_infos_ = NULL;
355 return tmp;
351 } 356 }
352 357
353 void LogDeoptCallPosition(int pc_offset, int inlining_id); 358 void LogDeoptCallPosition(int pc_offset, int inlining_id);
354 int TraceInlinedFunction(Handle<SharedFunctionInfo> shared, 359 int TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
355 SourcePosition position, int pareint_id); 360 SourcePosition position, int pareint_id);
356 361
357 Handle<Foreign> object_wrapper() { 362 Handle<Foreign> object_wrapper() {
358 if (object_wrapper_.is_null()) { 363 if (object_wrapper_.is_null()) {
359 object_wrapper_ = 364 object_wrapper_ =
360 isolate()->factory()->NewForeign(reinterpret_cast<Address>(this)); 365 isolate()->factory()->NewForeign(reinterpret_cast<Address>(this));
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 458
454 DeferredHandles* deferred_handles_; 459 DeferredHandles* deferred_handles_;
455 460
456 ZoneList<Handle<HeapObject> >* dependencies_[DependentCode::kGroupCount]; 461 ZoneList<Handle<HeapObject> >* dependencies_[DependentCode::kGroupCount];
457 462
458 BailoutReason bailout_reason_; 463 BailoutReason bailout_reason_;
459 464
460 int prologue_offset_; 465 int prologue_offset_;
461 466
462 List<OffsetRange>* no_frame_ranges_; 467 List<OffsetRange>* no_frame_ranges_;
463 std::vector<InlinedFunctionInfo> inlined_function_infos_; 468 std::vector<InlinedFunctionInfo>* inlined_function_infos_;
alph 2015/03/20 08:28:42 why not using a smart pointer?
loislo 2015/03/20 08:53:11 done
464 bool track_positions_; 469 bool track_positions_;
465 470
466 // A copy of shared_info()->opt_count() to avoid handle deref 471 // A copy of shared_info()->opt_count() to avoid handle deref
467 // during graph optimization. 472 // during graph optimization.
468 int opt_count_; 473 int opt_count_;
469 474
470 // Number of parameters used for compilation of stubs that require arguments. 475 // Number of parameters used for compilation of stubs that require arguments.
471 int parameter_count_; 476 int parameter_count_;
472 477
473 Handle<Foreign> object_wrapper_; 478 Handle<Foreign> object_wrapper_;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 Zone zone_; 706 Zone zone_;
702 size_t info_zone_start_allocation_size_; 707 size_t info_zone_start_allocation_size_;
703 base::ElapsedTimer timer_; 708 base::ElapsedTimer timer_;
704 709
705 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 710 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
706 }; 711 };
707 712
708 } } // namespace v8::internal 713 } } // namespace v8::internal
709 714
710 #endif // V8_COMPILER_H_ 715 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | src/profile-generator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698