[PATCH v3 1/5] perf report: Refactor common code in srcline.c

2017-01-19 Thread Jin Yao
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) {

[PATCH v3 1/5] perf report: Refactor common code in srcline.c

2017-01-19 Thread Jin Yao
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) {