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

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: Address review feedback 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') | src/log.cc » ('J')
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 KeyedStoreIC::ComputeExtraICState(language_mode, store_mode); 145 KeyedStoreIC::ComputeExtraICState(language_mode, store_mode);
146 PropertyICCompiler compiler(isolate, Code::KEYED_STORE_IC, extra_state); 146 PropertyICCompiler compiler(isolate, Code::KEYED_STORE_IC, extra_state);
147 compiler.CompileKeyedStorePolymorphicHandlers( 147 compiler.CompileKeyedStorePolymorphicHandlers(
148 receiver_maps, transitioned_maps, handlers, store_mode); 148 receiver_maps, transitioned_maps, handlers, store_mode);
149 } 149 }
150 150
151 151
152 Handle<Code> PropertyICCompiler::CompileLoadInitialize(Code::Flags flags) { 152 Handle<Code> PropertyICCompiler::CompileLoadInitialize(Code::Flags flags) {
153 LoadIC::GenerateInitialize(masm()); 153 LoadIC::GenerateInitialize(masm());
154 Handle<Code> code = GetCodeWithFlags(flags, "CompileLoadInitialize"); 154 Handle<Code> code = GetCodeWithFlags(flags, "CompileLoadInitialize");
155 PROFILE(isolate(), CodeCreateEvent(Logger::LOAD_INITIALIZE_TAG, *code, 0)); 155 PROFILE(isolate(), CodeCreateEvent(Logger::LOAD_INITIALIZE_TAG,
156 AbstractCode::cast(*code), 0));
156 return code; 157 return code;
157 } 158 }
158 159
159 160
160 Handle<Code> PropertyICCompiler::CompileStoreInitialize(Code::Flags flags) { 161 Handle<Code> PropertyICCompiler::CompileStoreInitialize(Code::Flags flags) {
161 StoreIC::GenerateInitialize(masm()); 162 StoreIC::GenerateInitialize(masm());
162 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreInitialize"); 163 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreInitialize");
163 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_INITIALIZE_TAG, *code, 0)); 164 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_INITIALIZE_TAG,
165 AbstractCode::cast(*code), 0));
164 return code; 166 return code;
165 } 167 }
166 168
167 169
168 Handle<Code> PropertyICCompiler::CompileStorePreMonomorphic(Code::Flags flags) { 170 Handle<Code> PropertyICCompiler::CompileStorePreMonomorphic(Code::Flags flags) {
169 StoreIC::GeneratePreMonomorphic(masm()); 171 StoreIC::GeneratePreMonomorphic(masm());
170 Handle<Code> code = GetCodeWithFlags(flags, "CompileStorePreMonomorphic"); 172 Handle<Code> code = GetCodeWithFlags(flags, "CompileStorePreMonomorphic");
171 PROFILE(isolate(), 173 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_PREMONOMORPHIC_TAG,
172 CodeCreateEvent(Logger::STORE_PREMONOMORPHIC_TAG, *code, 0)); 174 AbstractCode::cast(*code), 0));
173 return code; 175 return code;
174 } 176 }
175 177
176 178
177 Handle<Code> PropertyICCompiler::CompileStoreGeneric(Code::Flags flags) { 179 Handle<Code> PropertyICCompiler::CompileStoreGeneric(Code::Flags flags) {
178 ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags); 180 ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags);
179 LanguageMode language_mode = StoreICState::GetLanguageMode(extra_state); 181 LanguageMode language_mode = StoreICState::GetLanguageMode(extra_state);
180 GenerateRuntimeSetProperty(masm(), language_mode); 182 GenerateRuntimeSetProperty(masm(), language_mode);
181 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreGeneric"); 183 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreGeneric");
182 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_GENERIC_TAG, *code, 0)); 184 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_GENERIC_TAG,
185 AbstractCode::cast(*code), 0));
183 return code; 186 return code;
184 } 187 }
185 188
186 189
187 Handle<Code> PropertyICCompiler::CompileStoreMegamorphic(Code::Flags flags) { 190 Handle<Code> PropertyICCompiler::CompileStoreMegamorphic(Code::Flags flags) {
188 StoreIC::GenerateMegamorphic(masm()); 191 StoreIC::GenerateMegamorphic(masm());
189 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreMegamorphic"); 192 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreMegamorphic");
190 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_MEGAMORPHIC_TAG, *code, 0)); 193 PROFILE(isolate(), CodeCreateEvent(Logger::STORE_MEGAMORPHIC_TAG,
194 AbstractCode::cast(*code), 0));
191 return code; 195 return code;
192 } 196 }
193 197
194 198
195 Handle<Code> PropertyICCompiler::GetCode(Code::Kind kind, Code::StubType type, 199 Handle<Code> PropertyICCompiler::GetCode(Code::Kind kind, Code::StubType type,
196 Handle<Name> name, 200 Handle<Name> name,
197 InlineCacheState state) { 201 InlineCacheState state) {
198 Code::Flags flags = 202 Code::Flags flags =
199 Code::ComputeFlags(kind, state, extra_ic_state_, type, cache_holder()); 203 Code::ComputeFlags(kind, state, extra_ic_state_, type, cache_holder());
200 Handle<Code> code = GetCodeWithFlags(flags, name); 204 Handle<Code> code = GetCodeWithFlags(flags, name);
201 PROFILE(isolate(), CodeCreateEvent(log_kind(code), *code, *name)); 205 PROFILE(isolate(),
206 CodeCreateEvent(log_kind(code), AbstractCode::cast(*code), *name));
202 #ifdef DEBUG 207 #ifdef DEBUG
203 code->VerifyEmbeddedObjects(); 208 code->VerifyEmbeddedObjects();
204 #endif 209 #endif
205 return code; 210 return code;
206 } 211 }
207 212
208 213
209 void PropertyICCompiler::CompileKeyedStorePolymorphicHandlers( 214 void PropertyICCompiler::CompileKeyedStorePolymorphicHandlers(
210 MapHandleList* receiver_maps, MapHandleList* transitioned_maps, 215 MapHandleList* receiver_maps, MapHandleList* transitioned_maps,
211 CodeHandleList* handlers, KeyedAccessStoreMode store_mode) { 216 CodeHandleList* handlers, KeyedAccessStoreMode store_mode) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 289
285 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); 290 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss);
286 291
287 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); 292 return GetCode(kind(), Code::NORMAL, factory()->empty_string());
288 } 293 }
289 294
290 295
291 #undef __ 296 #undef __
292 } // namespace internal 297 } // namespace internal
293 } // namespace v8 298 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/log.h » ('j') | src/log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698