Linux Perf
tool.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PERF_TOOL_H
3 #define __PERF_TOOL_H
4 
5 #include <stdbool.h>
6 
7 #include <linux/types.h>
8 
9 struct perf_session;
10 union perf_event;
11 struct perf_evlist;
12 struct perf_evsel;
13 struct perf_sample;
14 struct perf_tool;
15 struct machine;
16 struct ordered_events;
17 
18 typedef int (*event_sample)(struct perf_tool *tool, union perf_event *event,
19  struct perf_sample *sample,
20  struct perf_evsel *evsel, struct machine *machine);
21 
22 typedef int (*event_op)(struct perf_tool *tool, union perf_event *event,
23  struct perf_sample *sample, struct machine *machine);
24 
25 typedef int (*event_attr_op)(struct perf_tool *tool,
26  union perf_event *event,
27  struct perf_evlist **pevlist);
28 
29 typedef int (*event_op2)(struct perf_tool *tool, union perf_event *event,
30  struct perf_session *session);
31 
32 typedef int (*event_oe)(struct perf_tool *tool, union perf_event *event,
33  struct ordered_events *oe);
34 
35 typedef s64 (*event_op3)(struct perf_tool *tool, union perf_event *event,
36  struct perf_session *session);
37 
42 };
43 
44 struct perf_tool {
46  read;
48  mmap2,
49  comm,
50  namespaces,
51  fork,
52  exit,
53  lost,
55  aux,
58  throttle,
59  unthrottle;
65  id_index,
68  time_conv,
69  thread_map,
70  cpu_map,
72  stat,
73  stat_round,
74  feature;
79  bool no_warn;
81 };
82 
83 #endif /* __PERF_TOOL_H */
int(* event_op)(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
Definition: tool.h:22
event_attr_op event_update
Definition: tool.h:61
event_op mmap2
Definition: tool.h:47
event_op lost
Definition: tool.h:47
enum show_feature_header show_feat_hdr
Definition: tool.h:80
event_op lost_samples
Definition: tool.h:47
event_op2 tracing_data
Definition: tool.h:62
show_feature_header
Definition: tool.h:38
s64(* event_op3)(struct perf_tool *tool, union perf_event *event, struct perf_session *session)
Definition: tool.h:35
event_op2 auxtrace_info
Definition: tool.h:64
event_op2 stat_config
Definition: tool.h:64
int(* event_attr_op)(struct perf_tool *tool, union perf_event *event, struct perf_evlist **pevlist)
Definition: tool.h:25
Definition: tool.h:44
static struct perf_session * session
Definition: builtin-lock.c:34
event_oe finished_round
Definition: tool.h:63
event_op exit
Definition: tool.h:47
static struct perf_tool tool
Definition: builtin-diff.c:362
event_op aux
Definition: tool.h:47
event_op2 time_conv
Definition: tool.h:64
bool ordered_events
Definition: tool.h:76
event_op2 cpu_map
Definition: tool.h:64
#define event
bool ordering_requires_timestamps
Definition: tool.h:77
event_op2 thread_map
Definition: tool.h:64
int(* event_sample)(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct perf_evsel *evsel, struct machine *machine)
Definition: tool.h:18
bool no_warn
Definition: tool.h:79
event_op2 stat
Definition: tool.h:64
event_op2 feature
Definition: tool.h:64
int(* event_oe)(struct perf_tool *tool, union perf_event *event, struct ordered_events *oe)
Definition: tool.h:32
event_op2 stat_round
Definition: tool.h:64
event_op namespaces
Definition: tool.h:47
event_op2 id_index
Definition: tool.h:64
event_op comm
Definition: tool.h:47
event_op2 auxtrace_error
Definition: tool.h:64
bool namespace_events
Definition: tool.h:78
event_op itrace_start
Definition: tool.h:47
event_sample read
Definition: tool.h:45
event_op unthrottle
Definition: tool.h:47
event_op fork
Definition: tool.h:47
event_attr_op attr
Definition: tool.h:60
event_op throttle
Definition: tool.h:47
event_op mmap
Definition: tool.h:47
event_op context_switch
Definition: tool.h:47
event_op2 build_id
Definition: tool.h:64
event_op3 auxtrace
Definition: tool.h:75
event_sample sample
Definition: tool.h:45
int(* event_op2)(struct perf_tool *tool, union perf_event *event, struct perf_session *session)
Definition: tool.h:29