Patent ID: 7380241
Filing Date: 2008-05-27
Classification: G06F

Abstract:
1. A method of profiling a process executing on a processor, the method comprising: receiving a profiling request from the process, the profiling request including a pointer to an unpinned histogram buffer that was allocated by the process in a memory; setting a flag in a data structure corresponding to the process indicating that the process is being profiled; allocating, by a kernel routine, a small pinned buffer in the memory, wherein the unpinned histogram buffer is larger than the small pinned buffer; initializing a buffer counter used to count the number of entries recorded in the small pinned buffer, wherein the small pinned buffer is allocated by a kernel routine; recording, in the small pinned buffer, a plurality of program counters encountered while executing the process until a threshold number of program counters recorded in the small pinned buffer is reached; incrementing the buffer counter each time one of the plurality of program counters is recorded in the small pinned buffer; in response to reaching the threshold number of program counters: