OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifdef ENABLE_GDB_JIT_INTERFACE | 5 #ifdef ENABLE_GDB_JIT_INTERFACE |
6 #include "src/v8.h" | 6 #include "src/v8.h" |
7 #include "src/gdb-jit.h" | 7 #include "src/gdb-jit.h" |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1850 bool dump_if_enabled, | 1850 bool dump_if_enabled, |
1851 const char* name_hint) { | 1851 const char* name_hint) { |
1852 #if defined(DEBUG) && !V8_OS_WIN | 1852 #if defined(DEBUG) && !V8_OS_WIN |
1853 static int file_num = 0; | 1853 static int file_num = 0; |
1854 if (FLAG_gdbjit_dump && dump_if_enabled) { | 1854 if (FLAG_gdbjit_dump && dump_if_enabled) { |
1855 static const int kMaxFileNameSize = 64; | 1855 static const int kMaxFileNameSize = 64; |
1856 static const char* kElfFilePrefix = "/tmp/elfdump"; | 1856 static const char* kElfFilePrefix = "/tmp/elfdump"; |
1857 static const char* kObjFileExt = ".o"; | 1857 static const char* kObjFileExt = ".o"; |
1858 char file_name[64]; | 1858 char file_name[64]; |
1859 | 1859 |
1860 OS::SNPrintF(Vector<char>(file_name, kMaxFileNameSize), | 1860 SNPrintF(Vector<char>(file_name, kMaxFileNameSize), |
1861 "%s%s%d%s", | 1861 "%s%s%d%s", |
1862 kElfFilePrefix, | 1862 kElfFilePrefix, |
1863 (name_hint != NULL) ? name_hint : "", | 1863 (name_hint != NULL) ? name_hint : "", |
1864 file_num++, | 1864 file_num++, |
1865 kObjFileExt); | 1865 kObjFileExt); |
1866 WriteBytes(file_name, entry->symfile_addr_, entry->symfile_size_); | 1866 WriteBytes(file_name, entry->symfile_addr_, entry->symfile_size_); |
1867 } | 1867 } |
1868 #endif | 1868 #endif |
1869 | 1869 |
1870 entry->next_ = __jit_debug_descriptor.first_entry_; | 1870 entry->next_ = __jit_debug_descriptor.first_entry_; |
1871 if (entry->next_ != NULL) entry->next_->prev_ = entry; | 1871 if (entry->next_ != NULL) entry->next_->prev_ = entry; |
1872 __jit_debug_descriptor.first_entry_ = | 1872 __jit_debug_descriptor.first_entry_ = |
1873 __jit_debug_descriptor.relevant_entry_ = entry; | 1873 __jit_debug_descriptor.relevant_entry_ = entry; |
1874 | 1874 |
1875 __jit_debug_descriptor.action_flag_ = JIT_REGISTER_FN; | 1875 __jit_debug_descriptor.action_flag_ = JIT_REGISTER_FN; |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2167 LockGuard<Mutex> lock_guard(mutex.Pointer()); | 2167 LockGuard<Mutex> lock_guard(mutex.Pointer()); |
2168 ASSERT(!IsLineInfoTagged(line_info)); | 2168 ASSERT(!IsLineInfoTagged(line_info)); |
2169 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); | 2169 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); |
2170 ASSERT(e->value == NULL); | 2170 ASSERT(e->value == NULL); |
2171 e->value = TagLineInfo(line_info); | 2171 e->value = TagLineInfo(line_info); |
2172 } | 2172 } |
2173 | 2173 |
2174 | 2174 |
2175 } } // namespace v8::internal | 2175 } } // namespace v8::internal |
2176 #endif | 2176 #endif |
OLD | NEW |