Data breakpoint with compacting garbage collection
AssigneeMicrosoft Technology Licensing, LLC
InventorsYing Hung Au, Zhicheng Zhu
Life of this patent
Estimating the term…
Abstract
Traditionally, setting a data breakpoint in a debugger for an execution environment that uses compacting garbage collection is ineffective as a compacting garbage collector moves data around in memory as part of its compaction process. Traditional debugging approaches such as tracing each insertion, etc. are impractical because of the quantity of operations encountered in a typical program. Described herein is a data breakpoint for a compacting garbage collection environment in which data breakpoints are disabled while the garbage collector is running, creating notifications for move operations, batching the notifications, retargeting data breakpoints and using the batched notifications to re-enable the disabled breakpoints.
Claims16
A computing device comprising:
- a processor:
- a memory connected to the processor;
- the processor configured to:
- set a data breakpoint for data of interest to a debugger located in a first location in the memory;
- receive a notification of a data move operation made by a compacting garbage collector;
- update a breakpoint address to point to a second location in the memory to which the data of interest to the debugger has been moved by the compacting garbage collector;
- and
- in response to receiving a notification from the compacting garbage collector, enabling the data breakpoint, wherein the data breakpoint was disabled by the compacting garbage collector.
A method comprising configuring a processor of a computing device executing in a compacting garbage collection environment to:
- receive a first notification from a debugger executing in a compacting garbage collection environment, that a data breakpoint has been set for a first location in memory comprising data of interest to a debugger;
- mark the first location with a marker that indicates that the first location in memory is associated with the data breakpoint;
- in response to detecting a change in content of the first location, triggering a pause, wherein the pause is triggered by a hardware interrupt.
A computing device comprising:
- a processor;
- a memory;
- the memory connected to the processor;
- the processor configured to:
- initiate garbage collection;
- and
- disable a data breakpoint in a program executing under a debugger,
- wherein the garbage collection performs a data move operation associated with the disabled data breakpoint.
Dependencies are inferred from the claim text.