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

Side by Side Diff: src/compiler.cc

Issue 9633012: Profiler experiments: merge self-optimization code into interrupt-at-exit (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/flag-definitions.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 SetMode(is_optimizable_closure ? BASE : NONOPT); 109 SetMode(is_optimizable_closure ? BASE : NONOPT);
110 } 110 }
111 111
112 112
113 // Primitive functions are unlikely to be picked up by the stack-walking 113 // Primitive functions are unlikely to be picked up by the stack-walking
114 // profiler, so they trigger their own optimization when they're called 114 // profiler, so they trigger their own optimization when they're called
115 // for the SharedFunctionInfo::kCallsUntilPrimitiveOptimization-th time. 115 // for the SharedFunctionInfo::kCallsUntilPrimitiveOptimization-th time.
116 bool CompilationInfo::ShouldSelfOptimize() { 116 bool CompilationInfo::ShouldSelfOptimize() {
117 return FLAG_self_optimization && 117 return FLAG_self_optimization &&
118 FLAG_crankshaft && 118 FLAG_crankshaft &&
119 !Serializer::enabled() &&
120 !function()->flags()->Contains(kDontSelfOptimize) && 119 !function()->flags()->Contains(kDontSelfOptimize) &&
121 !function()->flags()->Contains(kDontOptimize) && 120 !function()->flags()->Contains(kDontOptimize) &&
122 function()->scope()->allows_lazy_recompilation() && 121 function()->scope()->allows_lazy_recompilation() &&
123 (shared_info().is_null() || !shared_info()->optimization_disabled()); 122 (shared_info().is_null() || !shared_info()->optimization_disabled());
124 } 123 }
125 124
126 125
127 void CompilationInfo::AbortOptimization() { 126 void CompilationInfo::AbortOptimization() {
128 Handle<Code> code(shared_info()->code()); 127 Handle<Code> code(shared_info()->code());
129 SetCode(code); 128 SetCode(code);
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 } 801 }
803 } 802 }
804 803
805 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 804 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
806 Handle<Script>(info->script()), 805 Handle<Script>(info->script()),
807 Handle<Code>(info->code()), 806 Handle<Code>(info->code()),
808 info)); 807 info));
809 } 808 }
810 809
811 } } // namespace v8::internal 810 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698