systemtap退出状态为

时间:2017-04-27 05:45:35

标签: perf systemtap

我正在使用“systemtap / stap”来追踪“perf”命令,我遇到了一些问题,需要你的帮助。

案例1:

stap para-callgraph.stp 'process("/usr/bin/perf").function("*")' -c 'perf record -e net:net_dev_xmit usleep 1'

一开始工作正常。几秒钟后,我得到了以下错误。

[ 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

案例2:

我在上面搜索了错误消息(探测开销超过阈值)并按照建议添加了“-g --suppress-time-limits”。我到了下面。

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]

警告:子进程退出状态为1

看起来参数“record -e net:net_dev_xmit usleep 1”不会传递给perf。我错误地使用“systemtap / stap”吗?我该怎么办?

(请注意,上面使用的“para-callgraph.stp”复制自: https://sourceware.org/systemtap/examples/general/para-callgraph.stp

0 个答案:

没有答案