Performance profiling consists of monitoring a software system during execution and then analyzing the obtained data. There are two ways to collect profiling data: event tracing through code instrumentation and statistical sampling. These two approaches have different advantages and drawbacks. This paper proposes a hybrid approach to data collection that combines the completeness of event tracing with the low cost of statistical sampling. We propose to maximize the weighted amount of information obtained during data collection, show that such maximization can be performed in linear time or is NPhard depending on the data collected and the collection implementation. We propose an approximation algorithm for NP-hard case. Our paper also presents an application of the formal approach to an example use case. Categories and Subject Descriptors D.2.5 Testing and Debugging General Terms Algorithms, Measurement, Performance. Keywords Profiling, sampling, tracing.
Edu Metz, Raimondas Lencevicius, Teofilo F. Gonzal