aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
authorJin Yao <[email protected]>2017-03-25 20:34:25 +0000
committerArnaldo Carvalho de Melo <[email protected]>2017-03-27 14:59:23 +0000
commit5580338d0f207921bc1fef5b668cd564adcc3419 (patch)
tree0ef03c35c38b64667e75594cdc93dcb00330661c /tools/perf/util/annotate.c
parentperf tools: Remove unused 'prefix' from builtin functions (diff)
downloadkernel-5580338d0f207921bc1fef5b668cd564adcc3419.tar.gz
kernel-5580338d0f207921bc1fef5b668cd564adcc3419.zip
perf report: Refactor common code in srcline.c
Introduce dso__name() and filename_split() out of existing code because these codes will be used in several places in next patch. For filename_split(), it may also solve a potential memory leak in existing code. In existing addr2line(), sep = strchr(filename, ':'); if (sep) { *sep++ = '\0'; *file = filename; *line_nr = strtoul(sep, NULL, 0); ret = 1; } out: pclose(fp); return ret; If sep is NULL, filename is not freed or returned via file. Signed-off-by: Yao Jin <[email protected]> Tested-by: Milian Wolff <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.c')
0 files changed, 0 insertions, 0 deletions