Using gprof to Tune the 4.2BSD Kernel

Marshall Kirk McKusick

Computer Systems Research Group
Computer Science Division
Department of Electrical Engineering and Computer Science
University of California, Berkeley
Berkeley, California 94720


ABSTRACT

This paper describes how the gprof profiler accounts for the running time of called routines in the running time of the routines that call them. It then explains how to configure a profiling kernel on the 4.2 Berkeley Software Distribution of UNIXfor the VAX*** and discusses tradeoffs in techniques for collecting profile data. Gprof identifies problems that severely affects the overall performance of the kernel. Once a potential problem areas is identified benchmark programs are devised to highlight the bottleneck. These benchmarks verify that the problem exist and provide a metric against which to validate proposed solutions. Two caches are added to the kernel to alleviate the bottleneck and gprof is used to validates their effectiveness.


TABLE OF CONTENTS

1.  Introduction


2.  The gprof Profiler
 .1.    Data Presentation"
 .1.1.   The Flat Profile
 .1.2.   The Call Graph Profile
 .2     Profiling the Kernel


3.  Using gprof to Improve Performance
 .1.    Using the Profiler
 .2.    An Example of Tuning


4.  Conclusions


Acknowledgements


References































Table of Contents