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

Side by Side Diff: src/compiler.cc

Issue 1923893002: [counters] Annotate v8 with more runtime call counters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merging master Created 4 years, 7 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/api-arguments.cc ('k') | src/counters.h » ('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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 } 1017 }
1018 1018
1019 DCHECK(!info->is_debug() || !parse_info->allow_lazy_parsing()); 1019 DCHECK(!info->is_debug() || !parse_info->allow_lazy_parsing());
1020 1020
1021 FunctionLiteral* lit = parse_info->literal(); 1021 FunctionLiteral* lit = parse_info->literal();
1022 LiveEditFunctionTracker live_edit_tracker(isolate, lit); 1022 LiveEditFunctionTracker live_edit_tracker(isolate, lit);
1023 1023
1024 // Measure how long it takes to do the compilation; only take the 1024 // Measure how long it takes to do the compilation; only take the
1025 // rest of the function into account to avoid overlap with the 1025 // rest of the function into account to avoid overlap with the
1026 // parsing statistics. 1026 // parsing statistics.
1027 RuntimeCallTimerScope runtimeTimer(
1028 isolate, parse_info->is_eval() ? &RuntimeCallStats::CompileEval
1029 : &RuntimeCallStats::Compile);
1027 HistogramTimer* rate = parse_info->is_eval() 1030 HistogramTimer* rate = parse_info->is_eval()
1028 ? info->isolate()->counters()->compile_eval() 1031 ? info->isolate()->counters()->compile_eval()
1029 : info->isolate()->counters()->compile(); 1032 : info->isolate()->counters()->compile();
1030 HistogramTimerScope timer(rate); 1033 HistogramTimerScope timer(rate);
1031 TRACE_EVENT0("v8", parse_info->is_eval() ? "V8.CompileEval" : "V8.Compile"); 1034 TRACE_EVENT0("v8", parse_info->is_eval() ? "V8.CompileEval" : "V8.Compile");
1032 1035
1033 // Allocate a shared function info object. 1036 // Allocate a shared function info object.
1034 DCHECK_EQ(RelocInfo::kNoPosition, lit->function_token_position()); 1037 DCHECK_EQ(RelocInfo::kNoPosition, lit->function_token_position());
1035 result = NewSharedFunctionInfoForLiteral(isolate, lit, script); 1038 result = NewSharedFunctionInfoForLiteral(isolate, lit, script);
1036 result->set_is_toplevel(true); 1039 result->set_is_toplevel(true);
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 MaybeHandle<Code> code; 1760 MaybeHandle<Code> code;
1758 if (cached.code != nullptr) code = handle(cached.code); 1761 if (cached.code != nullptr) code = handle(cached.code);
1759 Handle<Context> native_context(function->context()->native_context()); 1762 Handle<Context> native_context(function->context()->native_context());
1760 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, 1763 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code,
1761 literals, BailoutId::None()); 1764 literals, BailoutId::None());
1762 } 1765 }
1763 } 1766 }
1764 1767
1765 } // namespace internal 1768 } // namespace internal
1766 } // namespace v8 1769 } // namespace v8
OLDNEW
« no previous file with comments | « src/api-arguments.cc ('k') | src/counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698