summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/comm.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2014-01-14 16:37:14 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-01-16 16:44:39 -0300
commit3178f58b989430fd0721df97bf21cf1c0e8cc419 (patch)
tree26a1d69797a907bedb10bac2a8f84f67e901af0f /tools/perf/util/comm.h
parent99ca423387a3e718f9887a99475cb5271bc610f2 (diff)
downloadlinux-3178f58b989430fd0721df97bf21cf1c0e8cc419.tar.gz
linux-3178f58b989430fd0721df97bf21cf1c0e8cc419.tar.bz2
linux-3178f58b989430fd0721df97bf21cf1c0e8cc419.zip
perf tools: Do proper comm override error handling
The comm overriding API ignores memory allocation failures by silently keeping the previous and out of date comm. As a result, the user may get buggy events without ever being notified about the problem and its source. Lets start to fix this by propagating the error from the API. Not all callers may be doing proper error handling on comm set yet but this is the first step toward it. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1389713836-13375-2-git-send-email-fweisbec@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/comm.h')
-rw-r--r--tools/perf/util/comm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/comm.h b/tools/perf/util/comm.h
index 7a86e5656710..fac5bd51befc 100644
--- a/tools/perf/util/comm.h
+++ b/tools/perf/util/comm.h
@@ -16,6 +16,6 @@ struct comm {
void comm__free(struct comm *comm);
struct comm *comm__new(const char *str, u64 timestamp);
const char *comm__str(const struct comm *comm);
-void comm__override(struct comm *comm, const char *str, u64 timestamp);
+int comm__override(struct comm *comm, const char *str, u64 timestamp);
#endif /* __PERF_COMM_H */