我正在尝试使用perf对我的应用程序进行基准测试。该应用程序是基于c++的,我想评估
L1-dcache-loads,L1-dcache-load-misses,L1-dcache-stores,cycles,instructions,cache-references,cache-misses,bus-cycles,branch-misses我希望避免在输出中看到perf事件,以使其更易于阅读。正在尝试运行以下命令来捕获输出:
perf record -g -e "L1-dcache-loads,L1-dcache-load-misses,L1-dcache-stores,cycles,instructions,cache-references,cache-misses,bus-cycles,branch-misses" --exclude-perf Binary-name但是上面提到的命令失败了,错误如下:
--exclude-perf option should follow a -e tracepoint option
Usage: perf record [options] [command]
or: perf record [options] -- command [options]
--exclude-perf don't record events from perf itself如果我不使用--exclude-perf选项,那么我的命令运行得很好,没有任何错误。
让我知道我在添加选项时犯了什么错误--exclude-perf
发布于 2017-04-30 10:27:31
--exclude-perf不像您使用的那样用于采样/分析事件(硬件CPU计数器)。它是否仅适用于跟踪点事件:http://lxr.free-electrons.com/source/tools/perf/Documentation/perf-record.txt
151 --exclude-perf::
152 Don't record events issued by perf itself. This option should follow
153 a event selector (-e) which selects tracepoint event(s). It adds a
154 filter expression 'common_pid != $PERFPID' to filters. If other
155 '--filter' exists, the new filter expression will be combined with
156 them by '&&'.它使用过滤器,过滤器将被附加到跟踪点事件。
https://stackoverflow.com/questions/43477926
复制相似问题