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

Side by Side Diff: src/api.cc

Issue 10795074: Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix instruction address calculation on move events. Fix test use of map, fix compilation on Win64. Created 8 years, 3 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 | « include/v8.h ('k') | src/compiler.cc » ('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 4245 matching lines...) Expand 10 before | Expand all | Expand 10 after
4256 ReturnAddressLocationResolver return_address_resolver) { 4256 ReturnAddressLocationResolver return_address_resolver) {
4257 i::V8::SetReturnAddressLocationResolver(return_address_resolver); 4257 i::V8::SetReturnAddressLocationResolver(return_address_resolver);
4258 } 4258 }
4259 4259
4260 4260
4261 bool v8::V8::SetFunctionEntryHook(FunctionEntryHook entry_hook) { 4261 bool v8::V8::SetFunctionEntryHook(FunctionEntryHook entry_hook) {
4262 return i::ProfileEntryHookStub::SetFunctionEntryHook(entry_hook); 4262 return i::ProfileEntryHookStub::SetFunctionEntryHook(entry_hook);
4263 } 4263 }
4264 4264
4265 4265
4266 void v8::V8::SetJitCodeEventHandler(
4267 JitCodeEventOptions options, JitCodeEventHandler event_handler) {
4268 i::Isolate* isolate = i::Isolate::Current();
4269 // Ensure that logging is initialized for our isolate.
4270 isolate->InitializeLoggingAndCounters();
4271 isolate->logger()->SetCodeEventHandler(options, event_handler);
4272 }
4273
4274
4266 bool v8::V8::Dispose() { 4275 bool v8::V8::Dispose() {
4267 i::Isolate* isolate = i::Isolate::Current(); 4276 i::Isolate* isolate = i::Isolate::Current();
4268 if (!ApiCheck(isolate != NULL && isolate->IsDefaultIsolate(), 4277 if (!ApiCheck(isolate != NULL && isolate->IsDefaultIsolate(),
4269 "v8::V8::Dispose()", 4278 "v8::V8::Dispose()",
4270 "Use v8::Isolate::Dispose() for a non-default isolate.")) { 4279 "Use v8::Isolate::Dispose() for a non-default isolate.")) {
4271 return false; 4280 return false;
4272 } 4281 }
4273 i::V8::TearDown(); 4282 i::V8::TearDown();
4274 return true; 4283 return true;
4275 } 4284 }
(...skipping 2252 matching lines...) Expand 10 before | Expand all | Expand 10 after
6528 6537
6529 v->VisitPointers(blocks_.first(), first_block_limit_); 6538 v->VisitPointers(blocks_.first(), first_block_limit_);
6530 6539
6531 for (int i = 1; i < blocks_.length(); i++) { 6540 for (int i = 1; i < blocks_.length(); i++) {
6532 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 6541 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
6533 } 6542 }
6534 } 6543 }
6535 6544
6536 6545
6537 } } // namespace v8::internal 6546 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698