blob: cee469803a34ac63885499c2f64b3de65b371946 [file] [log] [blame]
Tzvetomir Stoyanovbb3dd7e2018-10-05 12:22:25 -04001// SPDX-License-Identifier: LGPL-2.1
2/*
3 * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>
4 *
5 */
6
7#ifndef _PARSE_EVENTS_INT_H
8#define _PARSE_EVENTS_INT_H
9
Tzvetomir Stoyanov2e4318a2018-11-30 23:08:09 -050010struct tep_cmdline;
Tzvetomir Stoyanovbb3dd7e2018-10-05 12:22:25 -040011struct cmdline_list;
12struct func_map;
13struct func_list;
14struct event_handler;
15struct func_resolver;
16
17struct tep_handle {
18 int ref_count;
19
20 int header_page_ts_offset;
21 int header_page_ts_size;
22 int header_page_size_offset;
23 int header_page_size_size;
24 int header_page_data_offset;
25 int header_page_data_size;
26 int header_page_overwrite;
27
28 enum tep_endian file_bigendian;
29 enum tep_endian host_bigendian;
30
Tzvetomir Stoyanovbb3dd7e2018-10-05 12:22:25 -040031 int old_format;
32
33 int cpus;
34 int long_size;
35 int page_size;
36
Tzvetomir Stoyanov2e4318a2018-11-30 23:08:09 -050037 struct tep_cmdline *cmdlines;
Tzvetomir Stoyanovbb3dd7e2018-10-05 12:22:25 -040038 struct cmdline_list *cmdlist;
39 int cmdline_count;
40
41 struct func_map *func_map;
42 struct func_resolver *func_resolver;
43 struct func_list *funclist;
44 unsigned int func_count;
45
46 struct printk_map *printk_map;
47 struct printk_list *printklist;
48 unsigned int printk_count;
49
50
Tzvetomir Stoyanov97fbf3f2018-11-30 10:44:07 -050051 struct tep_event **events;
Tzvetomir Stoyanovbb3dd7e2018-10-05 12:22:25 -040052 int nr_events;
Tzvetomir Stoyanov97fbf3f2018-11-30 10:44:07 -050053 struct tep_event **sort_events;
Tzvetomir Stoyanovbb3dd7e2018-10-05 12:22:25 -040054 enum tep_event_sort_type last_type;
55
56 int type_offset;
57 int type_size;
58
59 int pid_offset;
60 int pid_size;
61
62 int pc_offset;
63 int pc_size;
64
65 int flags_offset;
66 int flags_size;
67
68 int ld_offset;
69 int ld_size;
70
Tzvetomir Stoyanovbb3dd7e2018-10-05 12:22:25 -040071 int test_filters;
72
73 int flags;
74
75 struct tep_format_field *bprint_ip_field;
76 struct tep_format_field *bprint_fmt_field;
77 struct tep_format_field *bprint_buf_field;
78
79 struct event_handler *handlers;
80 struct tep_function_handler *func_handlers;
81
82 /* cache */
Tzvetomir Stoyanov97fbf3f2018-11-30 10:44:07 -050083 struct tep_event *last_event;
Tzvetomir Stoyanovbb3dd7e2018-10-05 12:22:25 -040084};
85
Tzvetomir Stoyanov6cd99d22018-11-30 10:44:10 -050086void tep_free_event(struct tep_event *event);
87void tep_free_format_field(struct tep_format_field *field);
88
Tzvetomir Stoyanov047ff222019-04-01 12:43:17 -040089unsigned short tep_data2host2(struct tep_handle *tep, unsigned short data);
90unsigned int tep_data2host4(struct tep_handle *tep, unsigned int data);
91unsigned long long tep_data2host8(struct tep_handle *tep, unsigned long long data);
Tzvetomir Stoyanov6cd99d22018-11-30 10:44:10 -050092
Tzvetomir Stoyanovbb3dd7e2018-10-05 12:22:25 -040093#endif /* _PARSE_EVENTS_INT_H */