From: Arnaldo Carvalho de Melo Date: Fri, 12 Feb 2016 14:27:51 +0000 (-0300) Subject: perf tools: Add comment explaining the repsep_snprintf function X-Git-Tag: MMI-PSA29.97-13-9~8372^2~66^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=37d9bb580aa73c171c51fb93edf67a902bcb186f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git perf tools: Add comment explaining the repsep_snprintf function Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-4j67nvlfwbnkg85b969ewnkr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index de620f7f40f4..8b54ede7ec1f 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -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;