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

Side by Side Diff: src/compiler.cc

Issue 790413004: Implement AggregatableHistogramTimer and use it to measure how much time (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make windows compiler happy. Created 5 years, 11 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.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/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/ast-this-access-visitor.h" 10 #include "src/ast-this-access-visitor.h"
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 GetUnoptimizedCodeCommon(&info), 933 GetUnoptimizedCodeCommon(&info),
934 Code); 934 Code);
935 return result; 935 return result;
936 } 936 }
937 937
938 938
939 MaybeHandle<Code> Compiler::GetLazyCode(Handle<JSFunction> function) { 939 MaybeHandle<Code> Compiler::GetLazyCode(Handle<JSFunction> function) {
940 Isolate* isolate = function->GetIsolate(); 940 Isolate* isolate = function->GetIsolate();
941 DCHECK(!isolate->has_pending_exception()); 941 DCHECK(!isolate->has_pending_exception());
942 DCHECK(!function->is_compiled()); 942 DCHECK(!function->is_compiled());
943 AggregatedHistogramTimerScope timer(isolate->counters()->compile_lazy());
943 // If the debugger is active, do not compile with turbofan unless we can 944 // If the debugger is active, do not compile with turbofan unless we can
944 // deopt from turbofan code. 945 // deopt from turbofan code.
945 if (FLAG_turbo_asm && function->shared()->asm_function() && 946 if (FLAG_turbo_asm && function->shared()->asm_function() &&
946 (FLAG_turbo_deoptimization || !isolate->debug()->is_active())) { 947 (FLAG_turbo_deoptimization || !isolate->debug()->is_active())) {
947 CompilationInfoWithZone info(function); 948 CompilationInfoWithZone info(function);
948 949
949 VMState<COMPILER> state(isolate); 950 VMState<COMPILER> state(isolate);
950 PostponeInterruptsScope postpone(isolate); 951 PostponeInterruptsScope postpone(isolate);
951 952
952 info.SetOptimizing(BailoutId::None(), handle(function->shared()->code())); 953 info.SetOptimizing(BailoutId::None(), handle(function->shared()->code()));
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 AllowHandleDereference allow_deref; 1580 AllowHandleDereference allow_deref;
1580 bool tracing_on = info()->IsStub() 1581 bool tracing_on = info()->IsStub()
1581 ? FLAG_trace_hydrogen_stubs 1582 ? FLAG_trace_hydrogen_stubs
1582 : (FLAG_trace_hydrogen && 1583 : (FLAG_trace_hydrogen &&
1583 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1584 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1584 return (tracing_on && 1585 return (tracing_on &&
1585 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1586 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1586 } 1587 }
1587 1588
1588 } } // namespace v8::internal 1589 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698