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

Side by Side Diff: src/snapshot/code-serializer.cc

Issue 2061623002: Introduce JIT code events dispatcher for the isolate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebaseline Created 4 years, 6 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/regexp/x87/regexp-macro-assembler-x87.cc ('k') | src/v8.gyp » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/snapshot/code-serializer.h" 5 #include "src/snapshot/code-serializer.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/log.h" 8 #include "src/log.h"
9 #include "src/macro-assembler.h" 9 #include "src/macro-assembler.h"
10 #include "src/snapshot/deserializer.h" 10 #include "src/snapshot/deserializer.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 PrintF("[Deserializing from %d bytes took %0.3f ms]\n", length, ms); 182 PrintF("[Deserializing from %d bytes took %0.3f ms]\n", length, ms);
183 } 183 }
184 result->set_deserialized(true); 184 result->set_deserialized(true);
185 185
186 if (isolate->logger()->is_logging_code_events() || isolate->is_profiling()) { 186 if (isolate->logger()->is_logging_code_events() || isolate->is_profiling()) {
187 String* name = isolate->heap()->empty_string(); 187 String* name = isolate->heap()->empty_string();
188 if (result->script()->IsScript()) { 188 if (result->script()->IsScript()) {
189 Script* script = Script::cast(result->script()); 189 Script* script = Script::cast(result->script());
190 if (script->name()->IsString()) name = String::cast(script->name()); 190 if (script->name()->IsString()) name = String::cast(script->name());
191 } 191 }
192 isolate->logger()->CodeCreateEvent(Logger::SCRIPT_TAG, 192 PROFILE(isolate, CodeCreateEvent(CodeEventListener::SCRIPT_TAG,
193 result->abstract_code(), *result, name); 193 result->abstract_code(), *result, name));
194 } 194 }
195 return scope.CloseAndEscape(result); 195 return scope.CloseAndEscape(result);
196 } 196 }
197 197
198 class Checksum { 198 class Checksum {
199 public: 199 public:
200 explicit Checksum(Vector<const byte> payload) { 200 explicit Checksum(Vector<const byte> payload) {
201 #ifdef MEMORY_SANITIZER 201 #ifdef MEMORY_SANITIZER
202 // Computing the checksum includes padding bytes for objects like strings. 202 // Computing the checksum includes padding bytes for objects like strings.
203 // Mark every object as initialized in the code serializer. 203 // Mark every object as initialized in the code serializer.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 SanityCheckResult r = scd->SanityCheck(isolate, source); 354 SanityCheckResult r = scd->SanityCheck(isolate, source);
355 if (r == CHECK_SUCCESS) return scd; 355 if (r == CHECK_SUCCESS) return scd;
356 cached_data->Reject(); 356 cached_data->Reject();
357 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); 357 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r);
358 delete scd; 358 delete scd;
359 return NULL; 359 return NULL;
360 } 360 }
361 361
362 } // namespace internal 362 } // namespace internal
363 } // namespace v8 363 } // namespace v8
OLDNEW
« no previous file with comments | « src/regexp/x87/regexp-macro-assembler-x87.cc ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698