diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-10-09 07:22:04 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-10-09 07:23:23 +0200 |
commit | 8f51ba8e604e6b35105f120cd69018b14ade84d2 (patch) | |
tree | bce63ed0b2eb15b54e9dec30dd4df044c6c54ad4 /tools/lib/traceevent/event-parse.c | |
parent | 6364cb2218348cd5fba975e1ab5b7f37dee9adc4 (diff) | |
parent | bb3dd7e7c4d5e024d607c0ec06c2a2fb9408cc99 (diff) | |
download | linux-8f51ba8e604e6b35105f120cd69018b14ade84d2.tar.bz2 |
Merge tag 'perf-core-for-mingo-4.20-20181008' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
- Fix building the python bindings with python3, which fixes some
problems with building with clang on Clear Linux (Eduardo Habkost)
- Fix coverity warnings, fixing up some error paths and plugging
some temporary small buffer leaks (Sanskriti Sharma)
- Adopt a wrapper for strerror_r() for the same reasons as recently
for libbpf (Steven Rostedt)
- S390 does not support watchpoints in perf test 22', check if
that test is supported by the arch. (Thomas Richter)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/lib/traceevent/event-parse.c')
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 7980fc6c3bac..3692f29fee46 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c @@ -18,11 +18,12 @@ #include <errno.h> #include <stdint.h> #include <limits.h> -#include <linux/string.h> #include <linux/time64.h> #include <netinet/in.h> #include "event-parse.h" + +#include "event-parse-local.h" #include "event-utils.h" #include "trace-seq.h" @@ -6201,35 +6202,6 @@ enum tep_errno tep_parse_event(struct tep_handle *pevent, const char *buf, return __parse_event(pevent, &event, buf, size, sys); } -#undef _PE -#define _PE(code, str) str -static const char * const tep_error_str[] = { - TEP_ERRORS -}; -#undef _PE - -int tep_strerror(struct tep_handle *pevent __maybe_unused, - enum tep_errno errnum, char *buf, size_t buflen) -{ - int idx; - const char *msg; - - if (errnum >= 0) { - str_error_r(errnum, buf, buflen); - return 0; - } - - if (errnum <= __TEP_ERRNO__START || - errnum >= __TEP_ERRNO__END) - return -1; - - idx = errnum - __TEP_ERRNO__START - 1; - msg = tep_error_str[idx]; - snprintf(buf, buflen, "%s", msg); - - return 0; -} - int get_field_val(struct trace_seq *s, struct tep_format_field *field, const char *name, struct tep_record *record, unsigned long long *val, int err) |