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

Side by Side Diff: src/builtins.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: Ready for review Created 8 years, 5 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
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 13 matching lines...) Expand all
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "api.h" 30 #include "api.h"
31 #include "arguments.h" 31 #include "arguments.h"
32 #include "bootstrapper.h" 32 #include "bootstrapper.h"
33 #include "builtins.h" 33 #include "builtins.h"
34 #include "gdb-jit.h" 34 #include "code-events.h"
35 #include "ic-inl.h" 35 #include "ic-inl.h"
36 #include "heap-profiler.h" 36 #include "heap-profiler.h"
37 #include "mark-compact.h" 37 #include "mark-compact.h"
38 #include "vm-state-inl.h" 38 #include "vm-state-inl.h"
39 39
40 namespace v8 { 40 namespace v8 {
41 namespace internal { 41 namespace internal {
42 42
43 namespace { 43 namespace {
44 44
(...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 if (!maybe_code->ToObject(&code)) { 1636 if (!maybe_code->ToObject(&code)) {
1637 v8::internal::V8::FatalProcessOutOfMemory("CreateCode"); 1637 v8::internal::V8::FatalProcessOutOfMemory("CreateCode");
1638 } 1638 }
1639 } 1639 }
1640 } 1640 }
1641 // Log the event and add the code to the builtins array. 1641 // Log the event and add the code to the builtins array.
1642 PROFILE(isolate, 1642 PROFILE(isolate,
1643 CodeCreateEvent(Logger::BUILTIN_TAG, 1643 CodeCreateEvent(Logger::BUILTIN_TAG,
1644 Code::cast(code), 1644 Code::cast(code),
1645 functions[i].s_name)); 1645 functions[i].s_name));
1646 GDBJIT(AddCode(GDBJITInterface::BUILTIN, 1646 JIT_CODE_EVENT(AddCode(functions[i].s_name,
danno 2012/07/25 13:50:42 Why do you remove the code event type? It seems th
Sigurður Ásgeirsson 2012/07/25 14:38:35 I discussed this with @vegorov at some length, and
1647 functions[i].s_name, 1647 Code::cast(code)));
1648 Code::cast(code)));
1649 builtins_[i] = code; 1648 builtins_[i] = code;
1650 #ifdef ENABLE_DISASSEMBLER 1649 #ifdef ENABLE_DISASSEMBLER
1651 if (FLAG_print_builtin_code) { 1650 if (FLAG_print_builtin_code) {
1652 PrintF("Builtin: %s\n", functions[i].s_name); 1651 PrintF("Builtin: %s\n", functions[i].s_name);
1653 Code::cast(code)->Disassemble(functions[i].s_name); 1652 Code::cast(code)->Disassemble(functions[i].s_name);
1654 PrintF("\n"); 1653 PrintF("\n");
1655 } 1654 }
1656 #endif 1655 #endif
1657 } else { 1656 } else {
1658 // Deserializing. The values will be filled in during IterateBuiltins. 1657 // Deserializing. The values will be filled in during IterateBuiltins.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 return Handle<Code>(code_address); \ 1702 return Handle<Code>(code_address); \
1704 } 1703 }
1705 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1704 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1706 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1705 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1707 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1706 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1708 #undef DEFINE_BUILTIN_ACCESSOR_C 1707 #undef DEFINE_BUILTIN_ACCESSOR_C
1709 #undef DEFINE_BUILTIN_ACCESSOR_A 1708 #undef DEFINE_BUILTIN_ACCESSOR_A
1710 1709
1711 1710
1712 } } // namespace v8::internal 1711 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/code-events.h » ('j') | src/code-events.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698