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

Side by Side Diff: src/compiler.cc

Issue 1872833002: [compiler] Move tracing from backends to compiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-simplify-5
Patch Set: Rebased. Created 4 years, 8 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/compiler/pipeline.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/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/ast/ast-numbering.h" 9 #include "src/ast/ast-numbering.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 return SetLastStatus(FAILED); 347 return SetLastStatus(FAILED);
348 } 348 }
349 if (FLAG_hydrogen_stats) { 349 if (FLAG_hydrogen_stats) {
350 isolate()->GetHStatistics()->IncrementFullCodeGen(timer.Elapsed()); 350 isolate()->GetHStatistics()->IncrementFullCodeGen(timer.Elapsed());
351 } 351 }
352 } 352 }
353 353
354 DCHECK(info()->shared_info()->has_deoptimization_support()); 354 DCHECK(info()->shared_info()->has_deoptimization_support());
355 DCHECK(!info()->is_first_compile()); 355 DCHECK(!info()->is_first_compile());
356 356
357 if (FLAG_trace_opt) {
358 OFStream os(stdout);
359 os << "[compiling method " << Brief(*info()->closure()) << " using "
360 << compiler_name_;
361 if (info()->is_osr()) os << " OSR";
362 os << "]" << std::endl;
363 }
364
357 // Delegate to the underlying implementation. 365 // Delegate to the underlying implementation.
358 DCHECK_EQ(SUCCEEDED, last_status()); 366 DCHECK_EQ(SUCCEEDED, last_status());
359 ScopedTimer t(&time_taken_to_create_graph_); 367 ScopedTimer t(&time_taken_to_create_graph_);
360 return SetLastStatus(CreateGraphImpl()); 368 return SetLastStatus(CreateGraphImpl());
361 } 369 }
362 370
363 371
364 OptimizedCompileJob::Status OptimizedCompileJob::OptimizeGraph() { 372 OptimizedCompileJob::Status OptimizedCompileJob::OptimizeGraph() {
365 DisallowHeapAllocation no_allocation; 373 DisallowHeapAllocation no_allocation;
366 DisallowHandleAllocation no_handles; 374 DisallowHandleAllocation no_handles;
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 MaybeHandle<Code> code; 1741 MaybeHandle<Code> code;
1734 if (cached.code != nullptr) code = handle(cached.code); 1742 if (cached.code != nullptr) code = handle(cached.code);
1735 Handle<Context> native_context(function->context()->native_context()); 1743 Handle<Context> native_context(function->context()->native_context());
1736 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, 1744 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code,
1737 literals, BailoutId::None()); 1745 literals, BailoutId::None());
1738 } 1746 }
1739 } 1747 }
1740 1748
1741 } // namespace internal 1749 } // namespace internal
1742 } // namespace v8 1750 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698