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

Side by Side Diff: src/compiler.cc

Issue 1011113004: CpuProfiler: log pc offset for deopts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebaselined 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 | « src/compiler.h ('k') | src/ia32/lithium-codegen-ia32.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 8
9 #include "src/ast-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 OFStream os(tracing_scope.file()); 315 OFStream os(tracing_scope.file());
316 os << "INLINE (" << shared->DebugName()->ToCString().get() << ") id{" 316 os << "INLINE (" << shared->DebugName()->ToCString().get() << ") id{"
317 << optimization_id() << "," << inline_id << "} AS " << inline_id 317 << optimization_id() << "," << inline_id << "} AS " << inline_id
318 << " AT " << position << std::endl; 318 << " AT " << position << std::endl;
319 } 319 }
320 320
321 return inline_id; 321 return inline_id;
322 } 322 }
323 323
324 324
325 void CompilationInfo::LogDeoptCallPosition(int pc_offset, int inlining_id) {
326 if (!track_positions_ || IsStub()) return;
327 DCHECK_LT(static_cast<size_t>(inlining_id), inlined_function_infos_->size());
328 inlined_function_infos_->at(inlining_id)
329 .deopt_pc_offsets.push_back(pc_offset);
330 }
331
332
325 class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder { 333 class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
326 public: 334 public:
327 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) 335 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info)
328 : HOptimizedGraphBuilder(info) { 336 : HOptimizedGraphBuilder(info) {
329 } 337 }
330 338
331 #define DEF_VISIT(type) \ 339 #define DEF_VISIT(type) \
332 void Visit##type(type* node) OVERRIDE { \ 340 void Visit##type(type* node) OVERRIDE { \
333 SourcePosition old_position = SourcePosition::Unknown(); \ 341 SourcePosition old_position = SourcePosition::Unknown(); \
334 if (node->position() != RelocInfo::kNoPosition) { \ 342 if (node->position() != RelocInfo::kNoPosition) { \
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 parse_info_ = nullptr; 1605 parse_info_ = nullptr;
1598 } 1606 }
1599 1607
1600 #if DEBUG 1608 #if DEBUG
1601 void CompilationInfo::PrintAstForTesting() { 1609 void CompilationInfo::PrintAstForTesting() {
1602 PrintF("--- Source from AST ---\n%s\n", 1610 PrintF("--- Source from AST ---\n%s\n",
1603 PrettyPrinter(isolate(), zone()).PrintProgram(function())); 1611 PrettyPrinter(isolate(), zone()).PrintProgram(function()));
1604 } 1612 }
1605 #endif 1613 #endif
1606 } } // namespace v8::internal 1614 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698