I am using "systemtap/stap" to trace "perf" command, and I met some problems, need your help.
Case 1:
stap para-callgraph.stp 'process("/usr/bin/perf").function("*")' -c 'perf record -e net:net_dev_xmit usleep 1'
It works fine at first. After a few seconds, I got below error.
[ perf record: Woken up 1 times to write data ]
ERROR: probe overhead exceeded threshold
[ perf record: Captured and wrote 0.015 MB perf.data ]
WARNING: Number of errors: 1, skipped probes: 0
WARNING: There were 54023 transport failures.
WARNING: /usr/bin/staprun exited with status: 1
Pass 5: run failed. [man error::pass5
Case 2:
I googled above error message(probe overhead exceeded threshold) and added "-g --suppress-time-limits
" as suggested. And I got below.
stap -g --suppress-time-limits para-callgraph.stp 'process("/usr/bin/perf").function("*")' -c 'perf record -e net:net_dev_xmit usleep 1'
usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS]
The most commonly used perf commands are:
annotate Read perf.data (created by perf record) and display annotated code
archive Create archive with object files with build-ids found in perf.data file
bench General framework for benchmark suites
buildid-cache Manage build-id cache.
buildid-list List the buildids in a perf.data file
config Get and set variables in a configuration file.
data Data file related processing
diff Read perf.data files and display the differential profile
evlist List the event names in a perf.data file
inject Filter to augment the events stream with additional information
kmem Tool to trace/measure kernel memory properties
kvm Tool to trace/measure kvm guest os
list List all symbolic event types
lock Analyze lock events
mem Profile memory accesses
record Run a command and record its profile into perf.data
report Read perf.data (created by perf record) and display the profile
sched Tool to trace/measure scheduler properties (latencies)
script Read perf.data (created by perf record) and display trace output
stat Run a command and gather performance counter statistics
test Runs sanity tests.
timechart Tool to visualize total system behavior during a workload
top System profiling tool.
probe Define new dynamic tracepoints
trace strace inspired tool
See 'perf help COMMAND' for more information on a specific command.
WARNING: Child process exited with status 1
0 perf(4845):->_start
19 perf(4845): ->__libc_csu_init
23 perf(4845): ->_init
27 perf(4845): <-_init
82 perf(4845): <-__libc_csu_init
87 perf(4845): ->main
91 perf(4845): ->exec_cmd_init
99 perf(4845): <-exec_cmd_init
101 perf(4845): ->pager_init
104 perf(4845): <-pager_init
113 perf(4845): ->extract_argv0_path
121 perf(4845): <-extract_argv0_path
132 perf(4845): ->perf_config
137 perf(4845): ->system_path
142 perf(4845): <-system_path
167 perf(4845): ->mkpath
184 perf(4845): <-mkpath
207 perf(4845): <-perf_config
210 perf(4845): ->tracing_path_mount
214 perf(4845): ->tracefs__mount
641 perf(4845): <-tracefs__mount
646 perf(4845): ->debugfs__mount
676 perf(4845): <-debugfs__mount
698 perf(4845): <-tracing_path_mount
701 perf(4845): ->prefixcmp
705 perf(4845): <-prefixcmp
707 perf(4845): ->prefixcmp
710 perf(4845): <-prefixcmp
715 perf(4845): ->set_buildid_dir
720 perf(4845): ->perf_config
740 perf(4845): ->mkpath
747 perf(4845): <-mkpath
764 perf(4845): <-perf_config
780 perf(4845): <-set_buildid_dir
881 perf(4845): ->list_common_cmds_help
43584 perf(4845): <-list_common_cmds_help
43631 perf(4845): <-main
43643 perf(4845): ->_fini
43647 perf(4845): <-_fini
WARNING: /usr/bin/staprun exited with status: 1
Pass 5: run failed. [man error::pass5]
WARNING: Child process exited with status 1
It looks like the arguments "record -e net:net_dev_xmit usleep 1" are not passed to perf. Am I using "systemtap/stap" wrongly? What should I do?
(Please note that "para-callgraph.stp" used above is copied from: https://sourceware.org/systemtap/examples/general/para-callgraph.stp)