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

Side by Side Diff: src/code-stubs.cc

Issue 5965011: Basic GDB JIT Interface integration. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: minor formatting cleanup Created 9 years, 11 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 12 matching lines...) Expand all
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
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 "bootstrapper.h" 30 #include "bootstrapper.h"
31 #include "code-stubs.h" 31 #include "code-stubs.h"
32 #include "factory.h" 32 #include "factory.h"
33 #include "gdbjit.h"
33 #include "macro-assembler.h" 34 #include "macro-assembler.h"
34 #include "oprofile-agent.h" 35 #include "oprofile-agent.h"
35 36
36 namespace v8 { 37 namespace v8 {
37 namespace internal { 38 namespace internal {
38 39
39 bool CodeStub::FindCodeInCache(Code** code_out) { 40 bool CodeStub::FindCodeInCache(Code** code_out) {
40 int index = Heap::code_stubs()->FindEntry(GetKey()); 41 int index = Heap::code_stubs()->FindEntry(GetKey());
41 if (index != NumberDictionary::kNotFound) { 42 if (index != NumberDictionary::kNotFound) {
42 *code_out = Code::cast(Heap::code_stubs()->ValueAt(index)); 43 *code_out = Code::cast(Heap::code_stubs()->ValueAt(index));
(...skipping 14 matching lines...) Expand all
57 } 58 }
58 59
59 60
60 void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) { 61 void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) {
61 code->set_major_key(MajorKey()); 62 code->set_major_key(MajorKey());
62 63
63 OPROFILE(CreateNativeCodeRegion(GetName(), 64 OPROFILE(CreateNativeCodeRegion(GetName(),
64 code->instruction_start(), 65 code->instruction_start(),
65 code->instruction_size())); 66 code->instruction_size()));
66 PROFILE(CodeCreateEvent(Logger::STUB_TAG, code, GetName())); 67 PROFILE(CodeCreateEvent(Logger::STUB_TAG, code, GetName()));
68 GDBJIT(AddCode(GDBJITInterface::STUB, GetName(), code));
67 Counters::total_stubs_code_size.Increment(code->instruction_size()); 69 Counters::total_stubs_code_size.Increment(code->instruction_size());
68 70
69 #ifdef ENABLE_DISASSEMBLER 71 #ifdef ENABLE_DISASSEMBLER
70 if (FLAG_print_code_stubs) { 72 if (FLAG_print_code_stubs) {
71 #ifdef DEBUG 73 #ifdef DEBUG
72 Print(); 74 Print();
73 #endif 75 #endif
74 code->Disassemble(GetName()); 76 code->Disassemble(GetName());
75 PrintF("\n"); 77 PrintF("\n");
76 } 78 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 case CompareIC::OBJECTS: 193 case CompareIC::OBJECTS:
192 GenerateObjects(masm); 194 GenerateObjects(masm);
193 break; 195 break;
194 default: 196 default:
195 UNREACHABLE(); 197 UNREACHABLE();
196 } 198 }
197 } 199 }
198 200
199 201
200 } } // namespace v8::internal 202 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698