Files
linux-apfs/tools/perf/util/trace-event.h
T

83 lines
2.3 KiB
C
Raw Normal View History

#ifndef _PERF_UTIL_TRACE_EVENT_H
#define _PERF_UTIL_TRACE_EVENT_H
#include <traceevent/event-parse.h>
#include "parse-events.h"
#include "session.h"
struct machine;
struct perf_sample;
union perf_event;
struct perf_tool;
2013-07-18 16:06:15 -06:00
struct thread;
int bigendian(void);
struct pevent *read_trace_init(int file_bigendian, int host_bigendian);
2012-08-07 09:58:03 -03:00
void event_format__print(struct event_format *event,
int cpu, void *data, int size);
int parse_ftrace_file(struct pevent *pevent, char *buf, unsigned long size);
int parse_event_file(struct pevent *pevent,
char *buf, unsigned long size, char *sys);
unsigned long long
raw_field_value(struct event_format *event, const char *name, void *data);
void parse_proc_kallsyms(struct pevent *pevent, char *file, unsigned int size);
void parse_ftrace_printk(struct pevent *pevent, char *file, unsigned int size);
ssize_t trace_report(int fd, struct pevent **pevent, bool repipe);
struct event_format *trace_find_next_event(struct pevent *pevent,
struct event_format *event);
2012-08-07 23:50:21 -03:00
unsigned long long read_size(struct event_format *event, void *ptr, int size);
unsigned long long eval_flag(const char *flag);
2011-01-03 16:39:04 -02:00
int read_tracing_data(int fd, struct list_head *pattrs);
2011-10-20 15:59:43 +02:00
struct tracing_data {
/* size is only valid if temp is 'true' */
ssize_t size;
bool temp;
char temp_file[50];
};
struct tracing_data *tracing_data_get(struct list_head *pattrs,
int fd, bool temp);
int tracing_data_put(struct tracing_data *tdata);
2011-10-20 15:59:43 +02:00
struct addr_location;
struct perf_session;
2009-11-25 01:15:46 -06:00
struct scripting_ops {
const char *name;
int (*start_script) (const char *script, int argc, const char **argv);
2009-11-25 01:15:46 -06:00
int (*stop_script) (void);
2011-03-09 22:23:23 -07:00
void (*process_event) (union perf_event *event,
struct perf_sample *sample,
struct perf_evsel *evsel,
struct machine *machine,
2013-07-18 16:06:15 -06:00
struct thread *thread,
struct addr_location *al);
int (*generate_script) (struct pevent *pevent, const char *outfile);
2009-11-25 01:15:46 -06:00
};
int script_spec_register(const char *spec, struct scripting_ops *ops);
2009-11-25 01:15:48 -06:00
void setup_perl_scripting(void);
2010-01-27 02:27:57 -06:00
void setup_python_scripting(void);
2009-11-25 01:15:48 -06:00
struct scripting_context {
struct pevent *pevent;
void *event_data;
};
int common_pc(struct scripting_context *context);
int common_flags(struct scripting_context *context);
int common_lock_depth(struct scripting_context *context);
#endif /* _PERF_UTIL_TRACE_EVENT_H */