A Performance Profiler for Aiding in Threading Legacy C/C++ Code

Typ
Examensarbete för masterexamen
Master Thesis
Program
Publicerad
2009
Författare
Kindahl, Christian
Modellbyggare
Tidskriftstitel
ISSN
Volymtitel
Utgivare
Sammanfattning
There are software tools for aiding and automating the process multi-threading sequential programs that rely on complex static analysis. On large programs the analysis can be too heavy to be practically performed on the entire program. As a result a method is needed for effectively selecting which parts of a program to focus the analysis on. A suitable tool for this purpose is a performance profiler. This thesis aims at describing the design and implementation of a low-overhead performance profiler for aiding the analysis. It addresses the task with a requirement on operating system and processor architecture portability. The profiler uses a sample based strategy in combination with call stack analysis for collecting information on hot spots and hot paths. It allows profiling based on execution time as well as other metrics such as cache misses, specific arithmetic operations and more. Benchmarking the profiler with programs from the SPEC CPU2000 suite shows an overhead between 1% and 4% while still retaining a high degree of accuracy. --------------------------------------------------------------- //Sammanfattning// Det finns mjukvaruverktyg för att underlätta och automatisera parallellisering av sekventiella program som använder sig av komplex statisk analys. På stora program kan analysen bli för tung för att vara praktiskt genomförbar på hela programmet. På grund av detta behövs en metod för att välja ut vilka delar av programmet att fokusera analysen på. Ett lämpligt verktyg för detta är en prestandaprofilerare. Den här rapporten syftar till att beskriva designen och implementationen av en prestandaprofilerare vars syfte är att underlätta analysprocessen. Uppgiften attackeras med kravet att profileraren skall vara portabel över såväl operativsystem som processorarkitekturer. Profileraren använder sig av en samplingsbaserad strategi i kombination med analys av anropsstacken för att samla information om programmets beteende under körning. Profileraren tillåter profilering med avseende på exekveringstid och andra enheter som till exempel cache-missar, specifika aritmetiska operationer med mera. Prestandaevaluering av profileraren på program från SPEC CPU2000-sviten visar en overhead mellan 1% och 4% samtidigt som hög precision erhålls.
Beskrivning
Ämne/nyckelord
Programvaruteknik , Software Engineering
Citation
Arkitekt (konstruktör)
Geografisk plats
Byggnad (typ)
Byggår
Modelltyp
Skala
Teknik / material
Index