Questo contenuto non è disponibile nella lingua selezionata.
4.3. Profiling
4.3.1. Counting Function Calls Made Copia collegamentoCollegamento copiato negli appunti!
timer.ms()
). The output of functioncallcount.stp contains the name of the function called and how many times it was called during the sample time (in alphabetical order). Example 4.10, “functioncallcount.stp Sample Output” contains an excerpt from the output of stap countcalls.stp "*@mm/*.c"
:
Example 4.10. functioncallcount.stp Sample Output
4.3.2. Call Graph Tracing Copia collegamentoCollegamento copiato negli appunti!
- A trigger function (
@1
), which enables or disables tracing on a per-thread basis. Tracing in each thread will continue as long as the trigger function has not exited yet. - The kernel function/s whose entry/exit call you'd like to trace (
@2
).
thread_indent()
; as such, its output contains the timestamp, process name, and thread ID of @2
(i.e. the probe function you are tracing). For more information about thread_indent()
, refer to its entry in SystemTap Functions.
stap para-callgraph.stp sys_read '*@fs/*.c'
:
Example 4.11. para-callgraph-simple.stp Sample Output
4.3.3. Determining Time Spent in Kernel and User Space Copia collegamentoCollegamento copiato negli appunti!
Example 4.12. thread-times.stp Sample Output
4.3.4. Monitoring Polling Applications Copia collegamentoCollegamento copiato negli appunti!
poll
select
epoll
itimer
futex
nanosleep
signal
Example 4.13. timeout.stp Sample Output
timer.s()
). The output of functioncallcount.stp contains the name and UID of the top 20 polling applications, along with how many times each application performed each polling system call (over time). Example 4.13, “timeout.stp Sample Output” contains an excerpt of the script:
4.3.5. Tracking Most Frequently Used System Calls Copia collegamentoCollegamento copiato negli appunti!
poll
select
epoll
itimer
futex
nanosleep
signal
Example 4.14. topsys.stp Sample Output
4.3.6. Tracking System Call Volume Per Process Copia collegamentoCollegamento copiato negli appunti!
Example 4.15. topsys.stp Sample Output
timer.s()
probe; for example, to instruct the script to expire after 5 seconds, add the following probe to the script:
probe timer.s(5) { exit() }
probe timer.s(5)
{
exit()
}