10 research outputs found

    Pretenuring for Java

    Get PDF
    Pretenuring is a technique for reducing copying costs in garbage collectors. When pretenuring, the allocator places long-lived objects into regions that the garbage collector will rarely, if ever, collect. We extend previous work on profiling-driven pretenuring as follows. (1) We develop a collector-neutral approach to obtaining object lifetime profile information. We show that our collection of Java programs exhibits a very high degree of homogeneity of object lifetimes at each allocation site. This result is robust with respect to different inputs, and is similar to previous work on ML, but is in contrast to C programs, which require dynamic call chain context information to extract homogeneous lifetimes. Call-site homogeneity considerably simplifies the implementation of pretenuring and makes it more efficient. (2) Our pretenuring advice is neutral with respect to the collector algorithm, and we use it to improve two quite different garbage collectors: a traditional generational collector and an older-first collector. The system is also novel because it classifies and allocates objects into 3 categories: we allocate immortal objects into a permanent region that the collector will never consider, long-lived objects into a region in which the collector placed survivors of the most recent collection, and shortlived objects into the nursery, i.e., the default region. (3) We evaluate pretenuring on Java programs. Our simulation results show that pretenuring significantly reduces collector copying for generational and older-first collectors. 1

    Pluggable reflection: decoupling meta-interface and implementation

    Full text link

    A Lifetime-based Garbage Collector for LISP Systems on General-Purpose Computers

    Get PDF
    Garbage collector performance in LISP systems on custom hardware has been substantially improved by the adoption of lifetime-based garbage collection techniques. To date, however, successful lifetime-based garbage collectors have required special-purpose hardware, or at least privileged access to data structures maintained by the virtual memory system. I present here a lifetime-based garbage collector requiring no special-purpose hardware or virtual memory system support, and discuss its performance

    Gestion de cycle de vie des objets par aspects pour C +++

    Get PDF
    Les langages tels Java, Simula, Eiffel, Modula III sont des langages orientés objet qui ont gagné leur popularité grâce à la sûreté du traitement des exceptions et à la politique de sécurité qu'ils utilisent, notamment pour la gestion mémoire. En effet, Meyer a placé la gestion automatique de la mémoire en troisième position dans les "sept commandements" de la programmation orientée objet. L'entité utilisée pour assurer la gestion automatique de la mémoire est appelée Garbage Collector ou ramasse-miettes. Certains langages comme C, C++, Ada, Pascal et bien d'autres utilisent une libération explicite de la mémoire. L'avantage majeur de cette libération par rapport au Garbbage Collector est sans doute l'emploi des pointeurs, outil très important permettant un accès direct à certaines zones mémoires et une utilisation plus optimale de l'espace mémoire. Le C++ est l'un des langages de programmation les plus utilisés actuellement. Il est à la fois facile à utiliser et très efficace. Les caractéristiques du C++ en font un langage idéal pour certains types de projets. Il est incontournable dans la réalisation des grands programmes. Les optimisations des compilateurs actuels en font également un langage de prédilection pour ceux qui recherchent les performances. Puisqu'il est une extension de l'ANSI-C, C++ utilise une gestion explicite de la mémoire avec les delete, new, free et malloc. Pour Ellis et Stroustrup, la gestion de mémoire explicite via le Garbbage Collector n'est pas une composante du langage C++. Nous proposons dans notre travail de recherche un outil assurant une gestion implicite de la mémoire basé sur la programmation aspect, notamment avec l'extension AspectC++ qui est un préprocesseur pour un compilateur C++ usuel. L'idée est d'implémenter via AspectC++ des compteurs de références pour les objets nouvellement créés. Il s'agit d'attribuer un compteur de références à un objet, d'incrémenter ce compteur chaque fois qu'un autre objet crée une référence vers le premier objet et de décrémenter ce compteur chaque fois qu'une référence est supprimée. L'objet sera détruit dès que son compteur associé sera à zéro

    Source Code Similarity and Clone Search

    Get PDF
    Historically, clone detection as a research discipline has focused on devising source code similarity measurement and search solutions to cancel out effects of code reuse in software maintenance. However, it has also been observed that identifying duplications and similar programming patterns can be exploited for pragmatic reuse. Identifying such patterns requires a source code similarity model for detection of Type-1, 2, and 3 clones. Due to the lack of such a model, ad-hoc pattern detection models have been devised as part of state of the art solutions that support pragmatic reuse via code search. In this dissertation, we propose a clone search model which is based on the clone detection principles and satisfies the fundamental requirements for supporting pragmatic reuse. Our research presents a clone search model that not only supports scalability, short response times, and Type-1, 2 and 3 detection, but also emphasizes the need for supporting ranking as a key functionality. Our model takes advantage of a multi-level (non-positional) indexing approach to achieve a scalable and fast retrieval with high recall. Result sets are ranked using two ranking approaches: Jaccard similarity coefficient and the cosine similarity (vector space model) which exploits the code patterns’ local and global frequencies. We also extend the model by adapting a form of semantic search to cover bytecode code. Finally, we demonstrate how the proposed clone search model can be applied for spotting working code examples in the context of pragmatic reuse. Further evidence of the applicability of the clone search model is provided through performance evaluation

    Using Class-Level Static Properties to Predict Object Lifetimes

    Get PDF
    Today, most modern programming languages such as C # or Java use an automatic memory management system also known as a Garbage Collector (GC). Over the course of program execution, new objects are allocated in memory, and some older objects become unreachable (die). In order for the program to keep running, it becomes necessary to free the memory of dead objects; this task is performed periodically by the GC. Research has shown that most objects die young and as a result, generational collectors have become very popular over the years. Yet, these algorithms are not good at handling long-lived objects. Typically, long-lived objects would first be allocated in the nursery space and be promoted (copied) to an older generation after surviving a garbage collection, hence wasting precious time. By allocating long-lived and immortal objects directly into infrequently or never collected regions, pretenuring can reduce garbage collection costs significantly. Current state of the art methodology to predict object lifetime involves off-line profiling combined with a simple, heuristic classification. Profiling is slow (can take days), requires gathering gigabytes of data that need to be analysed (can take hours), and needs to be repeated for every previously unseen program. This thesis explores the space of lifetime predictions and shows how object lifetimes can be predicted accurately and quickly using simple program characteristics gathered within minutes. Following an innovative methodology introduced in this thesis, object lifetime predictions are fed into a specifically modified Java virtual machine. Performance tests show gains in GC times of as much as 77% for the “SPEC jvm98” benchmarks, against a generational copying collector
    corecore