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

Side by Side Diff: test/cctest/heap/test-heap.cc

Issue 2238893002: [debugger] separate break point info from code instrumentation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 4 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
« no previous file with comments | « src/objects-printer.cc ('k') | test/cctest/test-debug.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 // code flushing candidate. 1578 // code flushing candidate.
1579 heap::SimulateIncrementalMarking(heap); 1579 heap::SimulateIncrementalMarking(heap);
1580 1580
1581 // Enable the debugger and add a breakpoint while incremental marking 1581 // Enable the debugger and add a breakpoint while incremental marking
1582 // is running so that incremental marking aborts and code flushing is 1582 // is running so that incremental marking aborts and code flushing is
1583 // disabled. 1583 // disabled.
1584 int position = function->shared()->start_position(); 1584 int position = function->shared()->start_position();
1585 Handle<Object> breakpoint_object(Smi::FromInt(0), isolate); 1585 Handle<Object> breakpoint_object(Smi::FromInt(0), isolate);
1586 EnableDebugger(CcTest::isolate()); 1586 EnableDebugger(CcTest::isolate());
1587 isolate->debug()->SetBreakPoint(function, breakpoint_object, &position); 1587 isolate->debug()->SetBreakPoint(function, breakpoint_object, &position);
1588 isolate->debug()->ClearAllBreakPoints(); 1588 isolate->debug()->ClearBreakPoint(breakpoint_object);
1589 DisableDebugger(CcTest::isolate()); 1589 DisableDebugger(CcTest::isolate());
1590 1590
1591 // Force optimization now that code flushing is disabled. 1591 // Force optimization now that code flushing is disabled.
1592 { v8::HandleScope scope(CcTest::isolate()); 1592 { v8::HandleScope scope(CcTest::isolate());
1593 CompileRun("%OptimizeFunctionOnNextCall(foo); foo();"); 1593 CompileRun("%OptimizeFunctionOnNextCall(foo); foo();");
1594 } 1594 }
1595 1595
1596 // Simulate one final GC to make sure the candidate queue is sane. 1596 // Simulate one final GC to make sure the candidate queue is sane.
1597 heap->CollectAllGarbage(); 1597 heap->CollectAllGarbage();
1598 CHECK(function->shared()->is_compiled() || !function->IsOptimized()); 1598 CHECK(function->shared()->is_compiled() || !function->IsOptimized());
(...skipping 5518 matching lines...) Expand 10 before | Expand all | Expand 10 after
7117 chunk, chunk->area_end() - kPointerSize, chunk->area_end()); 7117 chunk, chunk->area_end() - kPointerSize, chunk->area_end());
7118 slots[chunk->area_end() - kPointerSize] = false; 7118 slots[chunk->area_end() - kPointerSize] = false;
7119 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { 7119 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) {
7120 CHECK(slots[addr]); 7120 CHECK(slots[addr]);
7121 return KEEP_SLOT; 7121 return KEEP_SLOT;
7122 }); 7122 });
7123 } 7123 }
7124 7124
7125 } // namespace internal 7125 } // namespace internal
7126 } // namespace v8 7126 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698