Method and apparatus for tracking activity of a garbage collector with a plurality of threads that operate concurrently with an application program
First Claim
1. A method for tracking activity of a garbage collector with a plurality of threads that operate concurrently with the operation of an application program during a time window on a computer system having a number of processors, the method comprising:
- (a) for each of the plurality of threads, computing the percentage of a small elapsed time window during which that thread is scheduled for operation;
(b) summing the percentages computed in step (a) over all of the plurality of threads; and
(c) multiplying the percentage computed in step (b) by the duration of the time window in order to determine the garbage collection time attributable to concurrent threads during the time window.
2 Assignments
0 Petitions
Accused Products
Abstract
The time cost of collecting a region in a Garbage-First garbage collector is adjusted to account for concurrent thread activity. The overhead of a concurrent thread is tracked by dividing elapsed time into relatively short time “windows” and monitoring the system during those windows to determine how long that thread is scheduled to run during those windows. Using measurements of this type for each concurrent thread, the percentage of each elapsed time window dedicated to each concurrent thread is determined. Finally, by summing the percentages of elapsed time dedicated to concurrent thread activity, the cost of collecting a region can be increased by adding the overhead attributable to concurrent activity.
28 Citations
19 Claims
-
1. A method for tracking activity of a garbage collector with a plurality of threads that operate concurrently with the operation of an application program during a time window on a computer system having a number of processors, the method comprising:
-
(a) for each of the plurality of threads, computing the percentage of a small elapsed time window during which that thread is scheduled for operation;
(b) summing the percentages computed in step (a) over all of the plurality of threads; and
(c) multiplying the percentage computed in step (b) by the duration of the time window in order to determine the garbage collection time attributable to concurrent threads during the time window. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. Apparatus for tracking activity of a garbage collector with a plurality of threads that operate concurrently with the operation of an application program during a time window on a computer system having a number of processors, the apparatus comprising:
-
a local overhead calculator in each of the plurality of threads that computes the percentage of a small elapsed time window during which that thread is scheduled for operation;
a mechanism, including a summer that sums the percentages computed by the local overhead calculators over all of the plurality of threads; and
a multiplier that multiplies the percentage computed by the summer by the duration of the time window in order to determine the garbage collection time attributable to concurrent threads during the time window. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. Apparatus for tracking activity of a garbage collector with a plurality of threads that operate concurrently with the operation of an application program during a time window on a computer system having a number of processors, the apparatus comprising:
-
means, operable for each of the plurality of threads, for computing a percentage of a small elapsed time window during which that thread is scheduled for operation;
means for summing the percentages computed by the means for computing a percentage over all of the plurality of threads; and
means for multiplying the sum generated by the means for summing by the duration of the time window in order to determine the garbage collection time attributable to concurrent threads during the time window. - View Dependent Claims (16, 17, 18, 19)
-
Specification