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

Side by Side Diff: src/gdb-jit.cc

Issue 13016003: GDBJIT: Add gdbjit_zone for --gdbjit_full (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 9 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 | « no previous file | src/isolate.h » ('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 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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 CompilationInfo* info_; 1014 CompilationInfo* info_;
1015 #ifdef V8_TARGET_ARCH_X64 1015 #ifdef V8_TARGET_ARCH_X64
1016 uintptr_t stack_state_start_addresses_[STACK_STATE_MAX]; 1016 uintptr_t stack_state_start_addresses_[STACK_STATE_MAX];
1017 #endif 1017 #endif
1018 }; 1018 };
1019 1019
1020 #if defined(__ELF) 1020 #if defined(__ELF)
1021 static void CreateSymbolsTable(CodeDescription* desc, 1021 static void CreateSymbolsTable(CodeDescription* desc,
1022 ELF* elf, 1022 ELF* elf,
1023 int text_section_index) { 1023 int text_section_index) {
1024 Zone* zone = desc->info()->zone(); 1024 Zone* zone = desc->info() ?
1025 desc->info()->zone() : Isolate::Current()->gdbjit_zone();
1025 ELFSymbolTable* symtab = new(zone) ELFSymbolTable(".symtab", zone); 1026 ELFSymbolTable* symtab = new(zone) ELFSymbolTable(".symtab", zone);
1026 ELFStringTable* strtab = new(zone) ELFStringTable(".strtab"); 1027 ELFStringTable* strtab = new(zone) ELFStringTable(".strtab");
1027 1028
1028 // Symbol table should be followed by the linked string table. 1029 // Symbol table should be followed by the linked string table.
1029 elf->AddSection(symtab, zone); 1030 elf->AddSection(symtab, zone);
1030 elf->AddSection(strtab, zone); 1031 elf->AddSection(strtab, zone);
1031 1032
1032 symtab->Add(ELFSymbol("V8 Code", 1033 symtab->Add(ELFSymbol("V8 Code",
1033 0, 1034 0,
1034 0, 1035 0,
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 bool UnwindInfoSection::WriteBodyInternal(Writer* w) { 1784 bool UnwindInfoSection::WriteBodyInternal(Writer* w) {
1784 uint32_t cie_position = WriteCIE(w); 1785 uint32_t cie_position = WriteCIE(w);
1785 WriteFDE(w, cie_position); 1786 WriteFDE(w, cie_position);
1786 return true; 1787 return true;
1787 } 1788 }
1788 1789
1789 1790
1790 #endif // V8_TARGET_ARCH_X64 1791 #endif // V8_TARGET_ARCH_X64
1791 1792
1792 static void CreateDWARFSections(CodeDescription* desc, DebugObject* obj) { 1793 static void CreateDWARFSections(CodeDescription* desc, DebugObject* obj) {
1793 Zone* zone = desc->info()->zone(); 1794 Zone* zone = desc->info() ?
1795 desc->info()->zone() : Isolate::Current()->gdbjit_zone();
1794 if (desc->IsLineInfoAvailable()) { 1796 if (desc->IsLineInfoAvailable()) {
1795 obj->AddSection(new(zone) DebugInfoSection(desc), zone); 1797 obj->AddSection(new(zone) DebugInfoSection(desc), zone);
1796 obj->AddSection(new(zone) DebugAbbrevSection(desc), zone); 1798 obj->AddSection(new(zone) DebugAbbrevSection(desc), zone);
1797 obj->AddSection(new(zone) DebugLineSection(desc), zone); 1799 obj->AddSection(new(zone) DebugLineSection(desc), zone);
1798 } 1800 }
1799 #ifdef V8_TARGET_ARCH_X64 1801 #ifdef V8_TARGET_ARCH_X64
1800 obj->AddSection(new(zone) UnwindInfoSection(desc), zone); 1802 obj->AddSection(new(zone) UnwindInfoSection(desc), zone);
1801 #endif 1803 #endif
1802 } 1804 }
1803 1805
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 entry->next_->prev_ = entry->prev_; 1911 entry->next_->prev_ = entry->prev_;
1910 } 1912 }
1911 1913
1912 __jit_debug_descriptor.relevant_entry_ = entry; 1914 __jit_debug_descriptor.relevant_entry_ = entry;
1913 __jit_debug_descriptor.action_flag_ = JIT_UNREGISTER_FN; 1915 __jit_debug_descriptor.action_flag_ = JIT_UNREGISTER_FN;
1914 __jit_debug_register_code(); 1916 __jit_debug_register_code();
1915 } 1917 }
1916 1918
1917 1919
1918 static JITCodeEntry* CreateELFObject(CodeDescription* desc) { 1920 static JITCodeEntry* CreateELFObject(CodeDescription* desc) {
1919 Zone* zone = desc->info()->zone(); 1921 Zone* zone = desc->info() ?
1922 desc->info()->zone() : Isolate::Current()->gdbjit_zone();
1920 ZoneScope zone_scope(zone, DELETE_ON_EXIT); 1923 ZoneScope zone_scope(zone, DELETE_ON_EXIT);
1921 #ifdef __MACH_O 1924 #ifdef __MACH_O
1922 MachO mach_o; 1925 MachO mach_o;
1923 Writer w(&mach_o); 1926 Writer w(&mach_o);
1924 1927
1925 mach_o.AddSection(new MachOTextSection(kCodeAlignment, 1928 mach_o.AddSection(new MachOTextSection(kCodeAlignment,
1926 desc->CodeStart(), 1929 desc->CodeStart(),
1927 desc->CodeSize())); 1930 desc->CodeSize()));
1928 1931
1929 CreateDWARFSections(desc, &mach_o); 1932 CreateDWARFSections(desc, &mach_o);
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
2169 ScopedLock lock(mutex.Pointer()); 2172 ScopedLock lock(mutex.Pointer());
2170 ASSERT(!IsLineInfoTagged(line_info)); 2173 ASSERT(!IsLineInfoTagged(line_info));
2171 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); 2174 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true);
2172 ASSERT(e->value == NULL); 2175 ASSERT(e->value == NULL);
2173 e->value = TagLineInfo(line_info); 2176 e->value = TagLineInfo(line_info);
2174 } 2177 }
2175 2178
2176 2179
2177 } } // namespace v8::internal 2180 } } // namespace v8::internal
2178 #endif 2181 #endif
OLDNEW
« no previous file with comments | « no previous file | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698