Using this command:
tprof -l -p /bb/bin/m_wsrusr.tsk -vskeujz -r tprof
After collecting a trace with the following:
/usr/bin/trace -adf -M -L 80000000 -T 80000000 -J tprof -j 2ff,234 -Call -r PURR -o /bb/pm/tprof.task/tprof.080814_104903/tprof.trc
Tprof produces a report with the usual summaries up top, and then a section
containing details of the PIDs corresponding to the application specified by
the '-p' flag.
In this case, the application specific section contains a breakdown of each
PID( for example, KERNEL ) as such:
+++++++++++++++++++++++++++++++++++ 1st +++++++++++++++++++++++++++++++++++
Total Ticks For m_wsrusr.tsk[18876130] (KERNEL) = 2315
Subroutine Ticks % Source Address Bytes
========== ===== ====== ====== ======= =====
.kexitx 354 0.09 /gsaro/ausgsa/projects/a/aix.15......
.kwaitpid 354 0.09 /gsaro/ausgsa/projects/a/aix.15......
.krlock 354 0.09 /gsaro/ausgsa/projects/a/aix.15......
........
+++++++++++++++++++++++++++++++++++ 2nd +++++++++++++++++++++++++++++++++++
Total Ticks For m_wsrusr.tsk[13960458] (KERNEL) = 2252
Subroutine Ticks % Source Address Bytes
========== ===== ====== ====== ======= =====
.krlock 348 0.09 /gsaro/ausgsa/projects/a/aix.15......
.kexitx 348 0.09 /gsaro/ausgsa/projects/a/aix.15......
.kwaitpid 348 0.09 /gsaro/ausgsa/projects/a/aix.15......
........
+++++++++++++++++++++++++++++++++++ 3rd +++++++++++++++++++++++++++++++++++
Total Ticks For m_wsrusr.tsk[6750956] (KERNEL) = 2523
Subroutine Ticks % Source Address Bytes
========== ===== ====== ====== ======= =====
.krlock 415 0.11 /gsaro/ausgsa/projects/a/aix.15......
._kwaitpid 415 0.11 /gsaro/ausgsa/projects/a/aix.15......
.kexitx 415 0.11 /gsaro/ausgsa/projects/a/aix.15......
........
The proposed summary section for this example would then start with something
like:
Total Ticks For m_wsrusr.tsk (KERNEL) = 7090
Subroutine Ticks % Source Address Bytes
========== ===== ====== ====== ======= =====
.krlock 1177 0.16 /gsaro/ausgsa/projects/a/aix.15......
._kwaitpid 1177 0.16 /gsaro/ausgsa/projects/a/aix.15......
.kexitx 1177 0.16 /gsaro/ausgsa/projects/a/aix.15......
........
The "per PID" breakdowns are extremely useful, but tprof does not provide a
summary of all KERNEL ticks for that particular application(specified by
'-p'). That kind of information is critical to determine how much overall
time is spent in routines by the entire application. Each of these PIDs may
be completing the same type of tasks. Therefore, the sum of the ticks would
let us determine more clearly where in general the application is spending
time.
To be clear, we wish that application summary for all common sections( KERNEL,
USER, SH-LIB, SEGMENTs, etc ).
There are variations which would make the information even more useful, such
as:
1) Average ticks/PID
2) # of PIDs calling that routine
3) MAX ticks encountered
4) MIN ticks encountered
Available in 7.2 TL2.
Creating a new RFE based on Community RFE #92756 in product IBM AIX.