mirror of
https://github.com/torvalds/linux.git
synced 2024-11-05 19:41:54 +00:00
63e0c7715a
The current perf code implicitly assumes SAMPLE_RAW means tracepoints are being used, but doesn't check for that. It happily records the TRACE_INFO even if SAMPLE_RAW is used without tracepoints, but when the perf data is read it won't go any further when it finds TRACE_INFO but no tracepoints, and displays misleading errors. This adds a check for both in perf-record, and won't record TRACE_INFO unless both are true. This at least allows perf report -D to dump raw events, and avoids triggering a misleading error condition in perf trace. It doesn't actually enable the non-tracepoint raw events to be displayed in perf trace, since perf trace currently only deals with tracepoint events. Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1272865861.7932.16.camel@tropicana> Signed-off-by: Tom Zanussi <tzanussi@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
38 lines
927 B
C
38 lines
927 B
C
#ifndef __PERF_PARSE_EVENTS_H
|
|
#define __PERF_PARSE_EVENTS_H
|
|
/*
|
|
* Parse symbolic events/counts passed in as options:
|
|
*/
|
|
|
|
struct option;
|
|
|
|
struct tracepoint_path {
|
|
char *system;
|
|
char *name;
|
|
struct tracepoint_path *next;
|
|
};
|
|
|
|
extern struct tracepoint_path *tracepoint_id_to_path(u64 config);
|
|
extern bool have_tracepoints(struct perf_event_attr *pattrs, int nb_events);
|
|
|
|
extern int nr_counters;
|
|
|
|
extern struct perf_event_attr attrs[MAX_COUNTERS];
|
|
extern char *filters[MAX_COUNTERS];
|
|
|
|
extern const char *event_name(int ctr);
|
|
extern const char *__event_name(int type, u64 config);
|
|
|
|
extern int parse_events(const struct option *opt, const char *str, int unset);
|
|
extern int parse_filter(const struct option *opt, const char *str, int unset);
|
|
|
|
#define EVENTS_HELP_MAX (128*1024)
|
|
|
|
extern void print_events(void);
|
|
|
|
extern char debugfs_path[];
|
|
extern int valid_debugfs_mount(const char *debugfs);
|
|
|
|
|
|
#endif /* __PERF_PARSE_EVENTS_H */
|