Microsoft Research334 тыс
Следующее
Опубликовано 17 августа 2016, 20:36
Modern managed languages, such as Java and C#, derive many software engineering benefits from the use of virtual machines. While the performance penalty of VMs has received significant attention, the information penalty has not: extra layers of virtualization make program behavior (and misbehavior) much more difficult to understand. The garbage collector, for example, takes over the job of freeing objects, eliminating a large class of memory errors. As a result, however, programmers no longer know when, if ever, objects are reclaimed. Our work explores a solution called VM introspection, which gives programmers an interface for asking the virtual machine specific questions about program behavior at runtime. Our focus is on information that is readily available or can be computed cheaply enough for use in deployed software. In this talk I will first describe GC Assertions, an introspective interface for detecting heap-based bugs, such as memory leaks and improper structure sharing. The key idea is to check programmer-written heap assertions using the garbage collector, which is in a unique position to perform whole-heap analysis. Checking at runtime avoids the challenges facing static techniques, many of which scale poorly or produce numerous false positives due to imprecision in the heap abstraction. Piggybacking on existing GC computations allows checking to be very efficient: our system can perform 100's to 1000's of heap checks during each GC with overheads around 2. In the second part of the talk I will describe our current and future work: (1) designing a more expressive language for heap properties, (2) exploring the limits of what can be checked during a single GC, and (3) implementing a concurrent checker based on snapshot-at-the-beginning concurrent garbage collection
Свежие видео
Случайные видео