diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2015-04-09 18:53:50 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-04-29 10:37:53 -0300 |
commit | 85ed47299e979b861e314c2e177a6de5d9163a85 (patch) | |
tree | 20fea1b09cfdf00ef760cc24f278bd9f8466bef8 /tools/perf/util/auxtrace.h | |
parent | f6986c95af84ff2a76847910b4322f542b793bbf (diff) | |
download | lwn-85ed47299e979b861e314c2e177a6de5d9163a85.tar.gz lwn-85ed47299e979b861e314c2e177a6de5d9163a85.zip |
perf auxtrace: Add helpers for AUX area tracing errors
Add functions to synthesize, count and print AUX area tracing error
events.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1428594864-29309-11-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/auxtrace.h')
-rw-r--r-- | tools/perf/util/auxtrace.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index 6355315a91fb..bcfb9288bfea 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -23,6 +23,7 @@ #include <linux/types.h> #include "../perf.h" +#include "event.h" #include "session.h" union perf_event; @@ -32,6 +33,7 @@ struct perf_tool; struct option; struct record_opts; struct auxtrace_info_event; +struct events_stats; enum itrace_period_type { PERF_ITRACE_PERIOD_INSTRUCTIONS, @@ -222,14 +224,26 @@ int auxtrace_record__info_fill(struct auxtrace_record *itr, void auxtrace_record__free(struct auxtrace_record *itr); u64 auxtrace_record__reference(struct auxtrace_record *itr); +void auxtrace_synth_error(struct auxtrace_error_event *auxtrace_error, int type, + int code, int cpu, pid_t pid, pid_t tid, u64 ip, + const char *msg); + int perf_event__synthesize_auxtrace_info(struct auxtrace_record *itr, struct perf_tool *tool, struct perf_session *session, perf_event__handler_t process); +int perf_event__process_auxtrace_error(struct perf_tool *tool, + union perf_event *event, + struct perf_session *session); int itrace_parse_synth_opts(const struct option *opt, const char *str, int unset); void itrace_synth_opts__set_default(struct itrace_synth_opts *synth_opts); +size_t perf_event__fprintf_auxtrace_error(union perf_event *event, FILE *fp); +void perf_session__auxtrace_error_inc(struct perf_session *session, + union perf_event *event); +void events_stats__auxtrace_error_warn(const struct events_stats *stats); + static inline int auxtrace__process_event(struct perf_session *session, union perf_event *event, struct perf_sample *sample, |