OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 25 matching lines...) Expand all Loading... |
36 // Currently on x64 and ia32 architectures and Linux OS are supported. | 36 // Currently on x64 and ia32 architectures and Linux OS are supported. |
37 // | 37 // |
38 | 38 |
39 #ifdef ENABLE_GDB_JIT_INTERFACE | 39 #ifdef ENABLE_GDB_JIT_INTERFACE |
40 #include "v8.h" | 40 #include "v8.h" |
41 #include "factory.h" | 41 #include "factory.h" |
42 | 42 |
43 namespace v8 { | 43 namespace v8 { |
44 namespace internal { | 44 namespace internal { |
45 | 45 |
| 46 class CompilationInfo; |
| 47 |
46 #define CODE_TAGS_LIST(V) \ | 48 #define CODE_TAGS_LIST(V) \ |
47 V(LOAD_IC) \ | 49 V(LOAD_IC) \ |
48 V(KEYED_LOAD_IC) \ | 50 V(KEYED_LOAD_IC) \ |
49 V(STORE_IC) \ | 51 V(STORE_IC) \ |
50 V(KEYED_STORE_IC) \ | 52 V(KEYED_STORE_IC) \ |
51 V(CALL_IC) \ | 53 V(CALL_IC) \ |
52 V(CALL_INITIALIZE) \ | 54 V(CALL_INITIALIZE) \ |
53 V(CALL_PRE_MONOMORPHIC) \ | 55 V(CALL_PRE_MONOMORPHIC) \ |
54 V(CALL_NORMAL) \ | 56 V(CALL_NORMAL) \ |
55 V(CALL_MEGAMORPHIC) \ | 57 V(CALL_MEGAMORPHIC) \ |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 CODE_TAGS_LIST(V) | 108 CODE_TAGS_LIST(V) |
107 #undef V | 109 #undef V |
108 default: | 110 default: |
109 return NULL; | 111 return NULL; |
110 } | 112 } |
111 } | 113 } |
112 | 114 |
113 static void AddCode(const char* name, | 115 static void AddCode(const char* name, |
114 Code* code, | 116 Code* code, |
115 CodeTag tag, | 117 CodeTag tag, |
116 Script* script = NULL); | 118 Script* script, |
| 119 CompilationInfo* info); |
117 | 120 |
118 static void AddCode(Handle<String> name, | 121 static void AddCode(Handle<String> name, |
119 Handle<Script> script, | 122 Handle<Script> script, |
120 Handle<Code> code); | 123 Handle<Code> code, |
| 124 CompilationInfo* info); |
121 | 125 |
122 static void AddCode(CodeTag tag, String* name, Code* code); | 126 static void AddCode(CodeTag tag, String* name, Code* code); |
123 | 127 |
124 static void AddCode(CodeTag tag, const char* name, Code* code); | 128 static void AddCode(CodeTag tag, const char* name, Code* code); |
125 | 129 |
126 static void AddCode(CodeTag tag, Code* code); | 130 static void AddCode(CodeTag tag, Code* code); |
127 | 131 |
128 static void RemoveCode(Code* code); | 132 static void RemoveCode(Code* code); |
129 | 133 |
130 static void RegisterDetailedLineInfo(Code* code, GDBJITLineInfo* line_info); | 134 static void RegisterDetailedLineInfo(Code* code, GDBJITLineInfo* line_info); |
131 | 135 |
132 private: | 136 private: |
133 static Mutex* mutex_; | 137 static Mutex* mutex_; |
134 }; | 138 }; |
135 | 139 |
136 #define GDBJIT(action) GDBJITInterface::action | 140 #define GDBJIT(action) GDBJITInterface::action |
137 | 141 |
138 } } // namespace v8::internal | 142 } } // namespace v8::internal |
139 #else | 143 #else |
140 #define GDBJIT(action) ((void) 0) | 144 #define GDBJIT(action) ((void) 0) |
141 #endif | 145 #endif |
142 | 146 |
143 #endif | 147 #endif |
OLD | NEW |