mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 07:25:25 +07:00
3178f58b98
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>
22 lines
457 B
C
22 lines
457 B
C
#ifndef __PERF_COMM_H
|
|
#define __PERF_COMM_H
|
|
|
|
#include "../perf.h"
|
|
#include <linux/rbtree.h>
|
|
#include <linux/list.h>
|
|
|
|
struct comm_str;
|
|
|
|
struct comm {
|
|
struct comm_str *comm_str;
|
|
u64 start;
|
|
struct list_head list;
|
|
};
|
|
|
|
void comm__free(struct comm *comm);
|
|
struct comm *comm__new(const char *str, u64 timestamp);
|
|
const char *comm__str(const struct comm *comm);
|
|
int comm__override(struct comm *comm, const char *str, u64 timestamp);
|
|
|
|
#endif /* __PERF_COMM_H */
|