linux/tools/perf/util/values.h
Arnaldo Carvalho de Melo 899735066a perf tools: Use normal error reporting when processing PERF_RECORD_READ events
We already have handling for errors when processing PERF_RECORD_ events,
so instead of calling die() when not being able to alloc, propagate the
error, so that the normal UI exit sequence can take place, the user be
warned and possibly the terminal be properly reset to a sane mode.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Brice Goglin <Brice.Goglin@inria.fr>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-r90je3c009a125dvs3525yge@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-10-24 11:07:44 -03:00

28 lines
622 B
C

#ifndef __PERF_VALUES_H
#define __PERF_VALUES_H
#include <linux/types.h>
struct perf_read_values {
int threads;
int threads_max;
u32 *pid, *tid;
int counters;
int counters_max;
u64 *counterrawid;
char **countername;
u64 **value;
};
int perf_read_values_init(struct perf_read_values *values);
void perf_read_values_destroy(struct perf_read_values *values);
int perf_read_values_add_value(struct perf_read_values *values,
u32 pid, u32 tid,
u64 rawid, const char *name, u64 value);
void perf_read_values_display(FILE *fp, struct perf_read_values *values,
int raw);
#endif /* __PERF_VALUES_H */