IP Library Granted Patent US 7,370,171
Granted Patent B1
US 7,370,171 · App. 10/831,887 · Granted May 6, 2008

Scalable buffer control for a tracing framework

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,370,171
App. No.
10/831,887
Granted
May 6, 2008
Kind
B1
Abstract

A method for storing a tracing event including encountering a tracing probe, selecting a probe buffer corresponding to the tracing probe, obtaining a buffer within the probe buffer using a thread identifier corresponding to a thread that encountered the tracing probe, and storing the tracing event in the buffer.

Claims (53)

1. A method for storing a tracing event comprising:

encountering a tracing probe;

selecting a probe buffer corresponding to the tracing probe, wherein the probe buffer is located within a corresponding central processing unit (CPU) buffer pool, wherein the CPU buffer pool is assigned to one of a plurality of CPUs;

obtaining a buffer within the probe buffer using a thread identifier corresponding to a thread that encountered the tracing probe, wherein the buffer within the probe buffer is obtained by applying a hash function to the thread identifier to obtain an index within the probe buffer, wherein the index references the buffer; and

storing the tracing event in the buffer obtained using the index.

2. The method of claim 1 , further comprising:

determining whether the buffer within the probe buffer is full;

recycling the buffer within the probe buffer if the buffer within the probe buffer is full;

if the buffer within the probe buffer is not full:

storing the tracing event at the index; and

updating the index corresponding to the buffer within the probe buffer.

3. The method of claim 2 , wherein recycling the buffer within the probe buffer further comprises:

obtaining a lock for the buffer within the probe buffer;

de-allocating the buffer within the probe buffer;

obtaining a new buffer within the probe buffer; and

updating the index to reference the new buffer within the probe buffer.

4. The method of claim 1 , wherein the index comprises:

a records field configured to reference the buffer within the probe buffer;

a current index field configured to track a location within the buffer; and

a state field configured to indicate the state of the buffer within the probe buffer.

5. The method of claim 4 , wherein the index further comprises:

a lock field configured to indicate whether the buffer within the probe buffer is in use; and

a buffer size field configured to store the size of the buffer within the probe buffer.

6. The method of claim 4 , wherein a value of the state field comprises at least one state selected from the group consisting of uninitialized, fill, and free.

7. An apparatus for storing a first tracing event comprising:

a first central processing unit (CPU);

an instrumented program comprising a tracing probe, wherein the tracing probe comprises a probe name;

a first thread configured to execute the instrumented program on the first CPU and generate the first tracing event, wherein the first thread comprises a first thread identifier; and

a global buffer configured to store the first tracing event,

wherein the global buffer is segmented into at least one CPU buffer, wherein the at least one CPU buffer is associated with the first CPU, and the at least one CPU buffer is further segmented into at least one probe buffer using the probe name, and the at least one probe buffer comprises at least one index, and

wherein the at least one index is associated with a buffer located within the probe buffer, wherein the buffer within the probe buffer is obtained by applying a hash function to the first thread identifier to obtain the at least one index, wherein the index references the buffer.

8. The apparatus for claim 7 , further comprising:

a second CPU; and

a second thread configured to execute the instrumented program on the second CPU and generate the second tracing event, wherein the second thread comprises a second thread identifier;

wherein the global buffer is configured to store the second tracing event.

9. The apparatus of claim 7 , wherein the thread identifier is used to access the at least one index.

10. The apparatus of claim 7 , wherein the at least one index comprises:

a records field configured to reference the buffer;

a current index field configured to track a location within the buffer; and

a state field configured to indicate the state of the buffer.

11. The apparatus of claim 10 , wherein the at least one index further comprises:

a lock field configured to indicate whether the buffer is in use; and

a buffer size field configured to store the size of the buffer.

12. The apparatus of claim 10 , wherein a value of the state field comprises at least one state selected from the group consisting of uninitialized, full, and free.

13. A computer system for balancing interrupts comprising:

a processor;

a memory;

a storage device; and

software instructions stored in the memory for enabling the computer system under control of the processor, to:

encounter a tracing probe;

select a probe buffer corresponding to the tracing probe, wherein the probe buffer is located within a corresponding central processing unit (CPU) buffer pool, wherein the CPU buffer pool is assigned to one of a plurality of CPUs;

obtain a buffer within the probe buffer using a thread identifier corresponding to a thread that encountered the tracing probe, wherein the buffer within the probe buffer is obtained by applying a hash function to the thread identifier to obtain an index within the probe buffer, wherein the index references the buffer; and

store the tracing event in the buffer within the probe buffer.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037303/0025 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 26, 2004
From: JEYARAM, PRABAHAR
To: SUN MICROSYSTEMS, INC.
Reel/Frame 015269/0489 →