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

Side by Side Diff: src/ic/ic-compiler.cc

Issue 1728593002: [Interpreter] Add support for cpu profiler logging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 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/ic/handler-compiler.cc ('k') | src/log.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ic/ic-compiler.h" 5 #include "src/ic/ic-compiler.h"
6 6
7 #include "src/ic/handler-compiler.h" 7 #include "src/ic/handler-compiler.h"
8 #include "src/ic/ic-inl.h" 8 #include "src/ic/ic-inl.h"
9 #include "src/profiler/cpu-profiler.h" 9 #include "src/profiler/cpu-profiler.h"
10 10
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 KeyedStoreIC::ComputeExtraICState(language_mode, store_mode); 168 KeyedStoreIC::ComputeExtraICState(language_mode, store_mode);
169 PropertyICCompiler compiler(isolate, Code::KEYED_STORE_IC, extra_state); 169 PropertyICCompiler compiler(isolate, Code::KEYED_STORE_IC, extra_state);
170 compiler.CompileKeyedStorePolymorphicHandlers( 170 compiler.CompileKeyedStorePolymorphicHandlers(
171 receiver_maps, transitioned_maps, handlers, store_mode); 171 receiver_maps, transitioned_maps, handlers, store_mode);
172 } 172 }
173 173
174 174
175 Handle<Code> PropertyICCompiler::CompileLoadInitialize(Code::Flags flags) { 175 Handle<Code> PropertyICCompiler::CompileLoadInitialize(Code::Flags flags) {
176 LoadIC::GenerateInitialize(masm()); 176 LoadIC::GenerateInitialize(masm());
177 Handle<Code> code = GetCodeWithFlags(flags, "CompileLoadInitialize"); 177 Handle<Code> code = GetCodeWithFlags(flags, "CompileLoadInitialize");
178 PROFILE(isolate(), CodeCreateEvent(Logger::LOAD_INITIALIZE_TAG, *code, 0)); 178 PROFILE(isolate(), CodeCreateEvent(Logger::LOAD_INITIALIZE_TAG,
179 AbstractCode::cast(*code), 0));
179 return code; 180 return code;
180 } 181 }
181 182
182 183
183 Handle<Code> PropertyICCompiler::CompileStoreInitialize(Code::Flags flags) { 184 Handle<Code> PropertyICCompiler::CompileStoreInitialize(Code::Flags flags) {
184 StoreIC::GenerateInitialize(masm()); 185 StoreIC::GenerateInitialize(masm());
185 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreInitialize"); 186 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreInitialize");
186 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_INITIALIZE_TAG, *code, 0)); 187 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_INITIALIZE_TAG,
188 AbstractCode::cast(*code), 0));
187 return code; 189 return code;
188 } 190 }
189 191
190 192
191 Handle<Code> PropertyICCompiler::CompileStorePreMonomorphic(Code::Flags flags) { 193 Handle<Code> PropertyICCompiler::CompileStorePreMonomorphic(Code::Flags flags) {
192 StoreIC::GeneratePreMonomorphic(masm()); 194 StoreIC::GeneratePreMonomorphic(masm());
193 Handle<Code> code = GetCodeWithFlags(flags, "CompileStorePreMonomorphic"); 195 Handle<Code> code = GetCodeWithFlags(flags, "CompileStorePreMonomorphic");
194 PROFILE(isolate(), 196 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_PREMONOMORPHIC_TAG,
195 CodeCreateEvent(Logger::STORE_PREMONOMORPHIC_TAG, *code, 0)); 197 AbstractCode::cast(*code), 0));
196 return code; 198 return code;
197 } 199 }
198 200
199 201
200 Handle<Code> PropertyICCompiler::CompileStoreGeneric(Code::Flags flags) { 202 Handle<Code> PropertyICCompiler::CompileStoreGeneric(Code::Flags flags) {
201 ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags); 203 ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags);
202 LanguageMode language_mode = StoreICState::GetLanguageMode(extra_state); 204 LanguageMode language_mode = StoreICState::GetLanguageMode(extra_state);
203 GenerateRuntimeSetProperty(masm(), language_mode); 205 GenerateRuntimeSetProperty(masm(), language_mode);
204 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreGeneric"); 206 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreGeneric");
205 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_GENERIC_TAG, *code, 0)); 207 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_GENERIC_TAG,
208 AbstractCode::cast(*code), 0));
206 return code; 209 return code;
207 } 210 }
208 211
209 212
210 Handle<Code> PropertyICCompiler::CompileStoreMegamorphic(Code::Flags flags) { 213 Handle<Code> PropertyICCompiler::CompileStoreMegamorphic(Code::Flags flags) {
211 StoreIC::GenerateMegamorphic(masm()); 214 StoreIC::GenerateMegamorphic(masm());
212 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreMegamorphic"); 215 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreMegamorphic");
213 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_MEGAMORPHIC_TAG, *code, 0)); 216 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_MEGAMORPHIC_TAG,
217 AbstractCode::cast(*code), 0));
214 return code; 218 return code;
215 } 219 }
216 220
217 221
218 Handle<Code> PropertyICCompiler::GetCode(Code::Kind kind, Code::StubType type, 222 Handle<Code> PropertyICCompiler::GetCode(Code::Kind kind, Code::StubType type,
219 Handle<Name> name, 223 Handle<Name> name,
220 InlineCacheState state) { 224 InlineCacheState state) {
221 Code::Flags flags = 225 Code::Flags flags =
222 Code::ComputeFlags(kind, state, extra_ic_state_, type, cache_holder()); 226 Code::ComputeFlags(kind, state, extra_ic_state_, type, cache_holder());
223 Handle<Code> code = GetCodeWithFlags(flags, name); 227 Handle<Code> code = GetCodeWithFlags(flags, name);
224 PROFILE(isolate(), CodeCreateEvent(log_kind(code), *code, *name)); 228 PROFILE(isolate(),
229 CodeCreateEvent(log_kind(code), AbstractCode::cast(*code), *name));
225 #ifdef DEBUG 230 #ifdef DEBUG
226 code->VerifyEmbeddedObjects(); 231 code->VerifyEmbeddedObjects();
227 #endif 232 #endif
228 return code; 233 return code;
229 } 234 }
230 235
231 236
232 void PropertyICCompiler::CompileKeyedStorePolymorphicHandlers( 237 void PropertyICCompiler::CompileKeyedStorePolymorphicHandlers(
233 MapHandleList* receiver_maps, MapHandleList* transitioned_maps, 238 MapHandleList* receiver_maps, MapHandleList* transitioned_maps,
234 CodeHandleList* handlers, KeyedAccessStoreMode store_mode) { 239 CodeHandleList* handlers, KeyedAccessStoreMode store_mode) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 312
308 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); 313 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss);
309 314
310 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); 315 return GetCode(kind(), Code::NORMAL, factory()->empty_string());
311 } 316 }
312 317
313 318
314 #undef __ 319 #undef __
315 } // namespace internal 320 } // namespace internal
316 } // namespace v8 321 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698