diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-02-12 11:27:51 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-02-12 12:52:20 -0300 |
commit | 37d9bb580aa73c171c51fb93edf67a902bcb186f (patch) | |
tree | 8641704b577e5487acb5d22d1c28d4570dbcc5d4 /tools/perf/util/sort.c | |
parent | b416e204f88dd91d9e99f6deee3d57fbc90aee40 (diff) |
perf tools: Add comment explaining the repsep_snprintf function
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-4j67nvlfwbnkg85b969ewnkr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/sort.c')
-rw-r--r-- | tools/perf/util/sort.c | 10 |
1 files changed, 9 insertions, 1 deletions
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; |