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

Side by Side Diff: src/debug.cc

Issue 9466012: Profiler experiments: Fix debugger in the presence of self-optimization headers (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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 | « src/arm/full-codegen-arm.cc ('k') | src/full-codegen.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 19 matching lines...) Expand all
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 "code-stubs.h" 33 #include "code-stubs.h"
34 #include "codegen.h" 34 #include "codegen.h"
35 #include "compilation-cache.h" 35 #include "compilation-cache.h"
36 #include "compiler.h" 36 #include "compiler.h"
37 #include "debug.h" 37 #include "debug.h"
38 #include "deoptimizer.h" 38 #include "deoptimizer.h"
39 #include "execution.h" 39 #include "execution.h"
40 #include "full-codegen.h"
40 #include "global-handles.h" 41 #include "global-handles.h"
41 #include "ic.h" 42 #include "ic.h"
42 #include "ic-inl.h" 43 #include "ic-inl.h"
43 #include "isolate-inl.h" 44 #include "isolate-inl.h"
44 #include "list.h" 45 #include "list.h"
45 #include "messages.h" 46 #include "messages.h"
46 #include "natives.h" 47 #include "natives.h"
47 #include "stub-cache.h" 48 #include "stub-cache.h"
48 #include "log.h" 49 #include "log.h"
49 50
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1745 // configuration configured above. 1746 // configuration configured above.
1746 bool result = Compiler::CompileLazy(&info); 1747 bool result = Compiler::CompileLazy(&info);
1747 ASSERT(result != Isolate::Current()->has_pending_exception()); 1748 ASSERT(result != Isolate::Current()->has_pending_exception());
1748 info.isolate()->clear_pending_exception(); 1749 info.isolate()->clear_pending_exception();
1749 #if DEBUG 1750 #if DEBUG
1750 if (result) { 1751 if (result) {
1751 Handle<Code> new_code(shared->code()); 1752 Handle<Code> new_code(shared->code());
1752 ASSERT(new_code->has_debug_break_slots()); 1753 ASSERT(new_code->has_debug_break_slots());
1753 ASSERT(current_code->is_compiled_optimizable() == 1754 ASSERT(current_code->is_compiled_optimizable() ==
1754 new_code->is_compiled_optimizable()); 1755 new_code->is_compiled_optimizable());
1755 ASSERT(current_code->instruction_size() <= new_code->instruction_size());
1756 } 1756 }
1757 #endif 1757 #endif
1758 return result; 1758 return result;
1759 } 1759 }
1760 1760
1761 1761
1762 static void CollectActiveFunctionsFromThread( 1762 static void CollectActiveFunctionsFromThread(
1763 Isolate* isolate, 1763 Isolate* isolate,
1764 ThreadLocalTop* top, 1764 ThreadLocalTop* top,
1765 List<Handle<JSFunction> >* active_functions, 1765 List<Handle<JSFunction> >* active_functions,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 new_code->instruction_start() - 1823 new_code->instruction_start() -
1824 debug_break_slot_bytes; 1824 debug_break_slot_bytes;
1825 if (new_delta > delta) { 1825 if (new_delta > delta) {
1826 break; 1826 break;
1827 } 1827 }
1828 1828
1829 // Passed a debug break slot in the full code with debug 1829 // Passed a debug break slot in the full code with debug
1830 // break slots. 1830 // break slots.
1831 debug_break_slot_count++; 1831 debug_break_slot_count++;
1832 } 1832 }
1833 if (frame_code->has_self_optimization_header() &&
1834 !new_code->has_self_optimization_header()) {
1835 delta -= FullCodeGenerator::self_optimization_header_size();
1836 } else {
1837 ASSERT(frame_code->has_self_optimization_header() ==
1838 new_code->has_self_optimization_header());
1839 }
1833 int debug_break_slot_bytes = 1840 int debug_break_slot_bytes =
1834 debug_break_slot_count * Assembler::kDebugBreakSlotLength; 1841 debug_break_slot_count * Assembler::kDebugBreakSlotLength;
1835 if (FLAG_trace_deopt) { 1842 if (FLAG_trace_deopt) {
1836 PrintF("Replacing code %08" V8PRIxPTR " - %08" V8PRIxPTR " (%d) " 1843 PrintF("Replacing code %08" V8PRIxPTR " - %08" V8PRIxPTR " (%d) "
1837 "with %08" V8PRIxPTR " - %08" V8PRIxPTR " (%d) " 1844 "with %08" V8PRIxPTR " - %08" V8PRIxPTR " (%d) "
1838 "for debugging, " 1845 "for debugging, "
1839 "changing pc from %08" V8PRIxPTR " to %08" V8PRIxPTR "\n", 1846 "changing pc from %08" V8PRIxPTR " to %08" V8PRIxPTR "\n",
1840 reinterpret_cast<intptr_t>( 1847 reinterpret_cast<intptr_t>(
1841 frame_code->instruction_start()), 1848 frame_code->instruction_start()),
1842 reinterpret_cast<intptr_t>( 1849 reinterpret_cast<intptr_t>(
(...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after
3555 { 3562 {
3556 Locker locker; 3563 Locker locker;
3557 Isolate::Current()->debugger()->CallMessageDispatchHandler(); 3564 Isolate::Current()->debugger()->CallMessageDispatchHandler();
3558 } 3565 }
3559 } 3566 }
3560 } 3567 }
3561 3568
3562 #endif // ENABLE_DEBUGGER_SUPPORT 3569 #endif // ENABLE_DEBUGGER_SUPPORT
3563 3570
3564 } } // namespace v8::internal 3571 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698