stripprof.sh
来自「ADaM is a data mining and image processi」· Shell 代码 · 共 27 行
SH
27 行
#!/bin/sh# Remove first 5 lines from stdin. Then keep all lines until a blank# line appears. This removes all extraneous info from gprof's flat# call graph. Then grab the seventh column, so we just get function# names.# This works with 2.15.92.0.2 when called with --no-graph (though it should# work even without --no-graph). Adding -c or -z will certainly mess up# the gprof output in ways that mess up this script.# For some reason, functions sometimes slip in which were never# called, or for which there is no call data. We'll use our "space# technique" from stripcalled.sh to eliminate these. Obviously, these# scripts may not work perfectly given the odd input possibilities.(for i in 1 2 3 4 5; do read line; done; # Remove first 5 lines. while read line; do # Stop reading at blank line. if [ -z "$line" ]; then break else echo "$line" fi done;) \| fgrep -v ' ' \| awk '{ print $7 }'
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?