diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-06-26 15:27:58 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-01 22:50:40 -0300 |
commit | 9c10548c42219e961279826c2763a0e32dc056b9 (patch) | |
tree | d02eb220dec310ce0bf15c2983940035e2de0efb /tools/perf/util/string2.h | |
parent | af0de0c5f060b1d4eae6033043eb9eafd15aa738 (diff) |
tools lib: Move argv_{split,free} from tools/perf/util/
This came from the kernel lib/argv_split.c, so move it to
tools/lib/argv_split.c, to get it closer to the kernel structure.
We need to audit the usage of argv_split() to figure out if it is really
necessary to do have one allocation per argv[] entry, looking at one of
its users I guess that is not the case and we probably are even leaking
those allocations by not using argv_free() judiciously, for later.
With this we further remove stuff from tools/perf/util/, reducing the
perf specific codebase and encouraging other tools/ code to use these
routines so as to keep the style and constructs used with the kernel.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-j479s1ive9h75w5lfg16jroz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/string2.h')
-rw-r--r-- | tools/perf/util/string2.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/perf/util/string2.h b/tools/perf/util/string2.h index 2696c3fcd780..708805f5573e 100644 --- a/tools/perf/util/string2.h +++ b/tools/perf/util/string2.h @@ -11,8 +11,6 @@ extern const char *graph_dotted_line; extern const char *dots; s64 perf_atoll(const char *str); -char **argv_split(const char *str, int *argcp); -void argv_free(char **argv); bool strglobmatch(const char *str, const char *pat); bool strglobmatch_nocase(const char *str, const char *pat); bool strlazymatch(const char *str, const char *pat); |