Exclusive, Inclusive, and Attributed Metrics

Three types of metrics are displayed for functions and load objects: exclusive, inclusive and attributed. Exclusive and inclusive metrics can be seen in any pane that displays metrics. Attributed metrics can only be seen in the Callers-Callees pane.

Exclusive metrics

Exclusive metrics for a function are calculated from events that occur in the function itself, but not in any function that it calls.

Exclusive metrics help you locate the functions, source lines or instructions in your program where resources are being spent or problems are occurring.

Exclusive metrics are indicated by the icon exclusive metrics icon.

Inclusive metrics

Inclusive metrics for a function are calculated from events that occur in the function itself and also in any functions that it calls, and any functions that these functions call, and so on. All metrics that result from calls to a function are included in the inclusive metric.

Inclusive metrics help you locate call trees in your program where resources are being spent or problems are occurring. A high inclusive metric for a function means that the function and the functions it calls should be the target for your investigation.

Inclusive metrics are indicated by the icon inclusive metrics icon.

Attributed metrics

Attributed metrics divide the inclusive metrics for a function between its callers or itself and its callees. Attributed metrics tell you how much of a function's inclusive metrics are due to calls from or to another function.

For a function's caller, the attributed metric is the amount of the function's inclusive metric that came from calls from that caller. The sum of the attributed metrics for all callers of the function is equal to the inclusive metric of the function.

For a callee, the attributed metric is the amount of the function's inclusive metric that came from calls to that callee. The sum of the attributed metrics of the callees and the exclusive metric of the function is equal to the function's inclusive metric.

Attributed metrics help you identify the path through your program which is responsible for a particular problem or resource usage.

Attributed metrics are indicated by the icon attributed metrics icon.

Example

Function C calls two functions, function D and function E. Function D executes for 10 seconds. Function E executes for 15 seconds as a result of calls from function C, and for 10 seconds as a result of calls from another function, function B. Function C itself spends 5 seconds executing.

The metric in this example is the execution time (User CPU time). The exclusive time for function C is 5 seconds, the exclusive time for function D is 10 seconds, and the exclusive time for function E is 25 seconds. Because functions D and E do not call any other functions, their inclusive times are equal to their exclusive times.

The inclusive time for function C is the time spent in function C (5 seconds) plus the time spent in function D (10 seconds), plus the time spent in function E as a result of calls from function C (15 seconds). The total of these, 30 seconds, is the inclusive metric for function C.

Function D contributes 10 seconds to the inclusive time of function C. Its attributed metric as a callee of function C is therefore 10 seconds. Function E contributes 15 seconds to the inclusive time of function C. Its attributed metric as a callee of function C is therefore 15 seconds.

The inclusive time for function E is 25 seconds. Function C is responsible for 15 seconds of the inclusive time of function E. Its attributed metric as a caller of function E is 15 seconds. Function B is responsible for the remaining 10 seconds of the inclusive time of function E. Its attributed metric as a caller of function E is 10 seconds.


Can't find what you are looking for? Submit your comments at http://www.sun.com/hwdocs/feedback.
Legal Notices