OLD | NEW |
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 18 matching lines...) Expand all Loading... |
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 "gdb-jit.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 #include "third_party/vtune/vtune-jit.h" |
39 | 40 |
40 namespace v8 { | 41 namespace v8 { |
41 namespace internal { | 42 namespace internal { |
42 | 43 |
43 namespace { | 44 namespace { |
44 | 45 |
45 // Arguments object passed to C++ builtins. | 46 // Arguments object passed to C++ builtins. |
46 template <BuiltinExtraArguments extra_args> | 47 template <BuiltinExtraArguments extra_args> |
47 class BuiltinArguments : public Arguments { | 48 class BuiltinArguments : public Arguments { |
48 public: | 49 public: |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1639 } | 1640 } |
1640 } | 1641 } |
1641 // Log the event and add the code to the builtins array. | 1642 // Log the event and add the code to the builtins array. |
1642 PROFILE(isolate, | 1643 PROFILE(isolate, |
1643 CodeCreateEvent(Logger::BUILTIN_TAG, | 1644 CodeCreateEvent(Logger::BUILTIN_TAG, |
1644 Code::cast(code), | 1645 Code::cast(code), |
1645 functions[i].s_name)); | 1646 functions[i].s_name)); |
1646 GDBJIT(AddCode(GDBJITInterface::BUILTIN, | 1647 GDBJIT(AddCode(GDBJITInterface::BUILTIN, |
1647 functions[i].s_name, | 1648 functions[i].s_name, |
1648 Code::cast(code))); | 1649 Code::cast(code))); |
| 1650 VTUNEJIT(AddCode(functions[i].s_name, |
| 1651 Code::cast(code))); |
1649 builtins_[i] = code; | 1652 builtins_[i] = code; |
1650 #ifdef ENABLE_DISASSEMBLER | 1653 #ifdef ENABLE_DISASSEMBLER |
1651 if (FLAG_print_builtin_code) { | 1654 if (FLAG_print_builtin_code) { |
1652 PrintF("Builtin: %s\n", functions[i].s_name); | 1655 PrintF("Builtin: %s\n", functions[i].s_name); |
1653 Code::cast(code)->Disassemble(functions[i].s_name); | 1656 Code::cast(code)->Disassemble(functions[i].s_name); |
1654 PrintF("\n"); | 1657 PrintF("\n"); |
1655 } | 1658 } |
1656 #endif | 1659 #endif |
1657 } else { | 1660 } else { |
1658 // Deserializing. The values will be filled in during IterateBuiltins. | 1661 // Deserializing. The values will be filled in during IterateBuiltins. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1703 return Handle<Code>(code_address); \ | 1706 return Handle<Code>(code_address); \ |
1704 } | 1707 } |
1705 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1708 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
1706 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1709 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
1707 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1710 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
1708 #undef DEFINE_BUILTIN_ACCESSOR_C | 1711 #undef DEFINE_BUILTIN_ACCESSOR_C |
1709 #undef DEFINE_BUILTIN_ACCESSOR_A | 1712 #undef DEFINE_BUILTIN_ACCESSOR_A |
1710 | 1713 |
1711 | 1714 |
1712 } } // namespace v8::internal | 1715 } } // namespace v8::internal |
OLD | NEW |