aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/string2.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-10-14 20:10:50 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-10-15 13:03:57 -0300
commitda949f507a73df5b5ad5031cb23b82a4d81846eb (patch)
treee56d2597f9854a94ccae5c633b93361c53aa00e6 /tools/perf/util/string2.h
parentperf trace: Introduce --errno-summary (diff)
downloadlinux-dev-da949f507a73df5b5ad5031cb23b82a4d81846eb.tar.xz
linux-dev-da949f507a73df5b5ad5031cb23b82a4d81846eb.zip
perf string: Export asprintf__tp_filter_pids()
Will be used directly in 'perf trace' for setting up the command line argv array to pass to cmd_record, as this was how 'perf trace record' was implemented, following the model used in 'perf kvm record', 'perf sched record', etc. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-w3cuwjs63lxf5zpryy3145uv@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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/string2.h b/tools/perf/util/string2.h
index 708805f5573e..73df616ced43 100644
--- a/tools/perf/util/string2.h
+++ b/tools/perf/util/string2.h
@@ -4,6 +4,7 @@
#include <linux/string.h>
#include <linux/types.h>
+#include <sys/types.h> // pid_t
#include <stddef.h>
#include <string.h>
@@ -32,6 +33,8 @@ static inline char *asprintf_expr_not_in_ints(const char *var, size_t nints, int
return asprintf_expr_inout_ints(var, false, nints, ints);
}
+char *asprintf__tp_filter_pids(size_t npids, pid_t *pids);
+
char *strpbrk_esc(char *str, const char *stopset);
char *strdup_esc(const char *str);