perf tools: Add comment explaining the repsep_snprintf function
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 37d9bb580aa73c171c51fb93edf67a902bcb186f Gitweb: http://git.kernel.org/tip/37d9bb580aa73c171c51fb93edf67a902bcb186f Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 12 Feb 2016 11:27:51 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Fri, 12 Feb 2016 12:52:20 -0300
perf tools: Add comment explaining the repsep_snprintf function
Cc Adrian Hunter <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/util/sort.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
tools/perf/util/sort.c +9 -1
@@ -28,7 +28,15 @@ int sort__has_socket = 0;int sort__has_thread =0 ;enum sort_mode sort__mode =SORT_MODE__NORMAL ; - +/* +* Replaces all occurrences of a char used with the: +* +* -t, --field-separator +* +* option, that uses a special separator character and don't pad with spaces, +* replacing all occurances of this separator in symbol names (and other +* output) with a '.' character, that thus it's the only non valid separator. +*/ static int repsep_snprintf (char *bf,size_t size,const char *fmt, ...) {int n;