The tprof –b command turns on basic data profiling
and collects data access information.
The summary section reports access information across
kernel data, library data, user global data, and stackheap sections
for each process, as shown in the following example:
Table 1. Data profiling of
the tprof -b command
| Process |
Freq |
Total |
Kernel |
User |
Shared |
Other |
| tlbref |
1 |
60.49 |
0.07 |
59.71 |
0.38 |
0.00 |
| /usr/bin/dd |
1 |
39.30 |
26.75 |
11.82 |
0.73 |
0.00 |
| tprof |
2 |
0.21 |
0.21 |
0.00 |
0.33 |
0.00 |
| Total |
20 |
100.00 |
27.03 |
71.53 |
1.44 |
0.00 |
Table 2. An example of the
data profiling report for the /usr/bin/dd process.
| Process |
PID |
TID |
Total |
Kernel |
User |
Shared |
Other |
| tlbref |
327688 |
757943 |
60.49 |
0/07 |
59.71 |
0.38 |
0.00 |
| |
Kernel: |
0.04% |
|
|
|
|
|
| |
lib: |
0.00% |
|
|
|
|
|
| |
u_global: |
0.00% |
|
|
|
|
|
| |
stackheap: |
u_global: |
0.00% |
|
|
|
|
| |
unresolved: |
99.42% |
|
|
|
|
|
| tprof |
3278000 |
792863 |
0.21 |
0.21 |
0.00 |
0.00 |
0.00 |
| |
kernel: |
0.20% |
|
|
|
|
|
| |
lib: |
0.00% |
|
|
|
|
|
| |
u_global: |
0.00% |
|
|
|
|
|
| |
stackheap |
0.00% |
|
|
|
|
|
| |
unresolved: |
0.01% |
|
|
|
|
|
| /usr/bin/dd |
323768 |
974985 |
39.30 |
26.75 |
11.82 |
0.73 |
0.00 |
| |
kernel: |
12.86% |
|
|
|
|
|
| |
lib: |
0.00% |
|
|
|
|
|
| |
u_global: |
7.80% |
|
|
|
|
|
| |
stackheap: |
2.42% |
|
|
|
|
|
| |
unresolved: |
2.18% |
|
|
|
|
|
| Total |
|
|
100.00 |
27.03 |
99.01 |
1.44 |
0.00 |
When used with the-s, -u, -k and -e flags,
the tprof command's data profiling reports most-used data
structures (exported data symbols) in shared library, binary, kernel
and kernel extensions. The -B flag also reports the functions
that use data structures.
The second table shown is an example of the data profiling
report for the /usr/bin/dd process.. The example report shows that
__start data structure is the most used data structure in the /usr/bin/dd
process, based on the samples collected. The data structure is a list
of functions (right aligned) that use the data structure, reported
along with their share and source as shown in the following example:
Total % For /usr/bin/dd[323768] (/usr/bin/dd) = 11.69
| Subroutine |
% |
Source |
| .noconv |
11.29 |
/usr/bin/dd |
| .main |
0.14 |
/usr/bin/dd |
| .read |
0.07 |
glink.s |
| .setobuf |
0.05 |
/usr/bin/dd |
| .rpipe |
0.04 |
/usr/bin/dd |
| .flsh |
0.04 |
/usr/bin/dd |
| .write |
0.04 |
glink.s |
| .wbuf |
0.02 |
/usr/bin/dd |
| .rbuf |
0.02 |
/usr/bin/dd |
| Data |
% |
Source |
| __start |
7.80 |
/usr/bin/dd |
| .noconv |
6.59 |
/usr/bin/dd |
| .main |
0.14 |
/usr/bin/dd |
| .read |
0.04 |
glink.s |
| .wbuf |
0.02 |
/usr/bin/dd |
| .write |
0.02 |
glink.s |
| .flsh |
0.102 |
/usr/bin/dd |