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

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: comments addressed 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') | no next file with comments »
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;
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 } 351 }
352 const std::vector<InlinedFunctionInfo>& inlined_function_infos() {
Sven Panne 2015/03/24 10:25:30 Hmmm, returning this by reference is not nice: Loo
loislo 2015/03/24 10:46:34 1) We pass CompilationInfo to logger when we finis
Sven Panne 2015/03/24 10:56:54 To be exact: It doesn't copy the inlining info at
353 return inlined_function_infos_;
354 }
352 355
353 void LogDeoptCallPosition(int pc_offset, int inlining_id); 356 void LogDeoptCallPosition(int pc_offset, int inlining_id);
354 int TraceInlinedFunction(Handle<SharedFunctionInfo> shared, 357 int TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
355 SourcePosition position, int pareint_id); 358 SourcePosition position, int pareint_id);
356 359
357 Handle<Foreign> object_wrapper() { 360 Handle<Foreign> object_wrapper() {
358 if (object_wrapper_.is_null()) { 361 if (object_wrapper_.is_null()) {
359 object_wrapper_ = 362 object_wrapper_ =
360 isolate()->factory()->NewForeign(reinterpret_cast<Address>(this)); 363 isolate()->factory()->NewForeign(reinterpret_cast<Address>(this));
361 } 364 }
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 Zone zone_; 704 Zone zone_;
702 size_t info_zone_start_allocation_size_; 705 size_t info_zone_start_allocation_size_;
703 base::ElapsedTimer timer_; 706 base::ElapsedTimer timer_;
704 707
705 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 708 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
706 }; 709 };
707 710
708 } } // namespace v8::internal 711 } } // namespace v8::internal
709 712
710 #endif // V8_COMPILER_H_ 713 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698