Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
4.3. Profiling
4.3.1. Counting Function Calls Made Link kopierenLink in die Zwischenablage kopiert!
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 Link kopierenLink in die Zwischenablage kopiert!
- 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 Link kopierenLink in die Zwischenablage kopiert!
Example 4.12. thread-times.stp Sample Output
4.3.4. Monitoring Polling Applications Link kopierenLink in die Zwischenablage kopiert!
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 Link kopierenLink in die Zwischenablage kopiert!
poll
select
epoll
itimer
futex
nanosleep
signal
Example 4.14. topsys.stp Sample Output
4.3.6. Tracking System Call Volume Per Process Link kopierenLink in die Zwischenablage kopiert!
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()
}