blob: 0ea1df0ad9a77cff3830964825a0cc9b5649110f [file] [log] [blame]
Daniel Bristot de Oliveirab1696372021-12-10 19:11:21 +01001// SPDX-License-Identifier: GPL-2.0
2#include <tracefs.h>
3#include <stddef.h>
4
5struct trace_instance {
6 struct tracefs_instance *inst;
7 struct tep_handle *tep;
8 struct trace_seq *seq;
9};
10
11int trace_instance_init(struct trace_instance *trace, char *tool_name);
12int trace_instance_start(struct trace_instance *trace);
13void trace_instance_destroy(struct trace_instance *trace);
14
15struct trace_seq *get_trace_seq(void);
16int enable_tracer_by_name(struct tracefs_instance *inst, const char *tracer_name);
17void disable_tracer(struct tracefs_instance *inst);
18
19int enable_osnoise(struct trace_instance *trace);
20int enable_timerlat(struct trace_instance *trace);
21
22struct tracefs_instance *create_instance(char *instance_name);
23void destroy_instance(struct tracefs_instance *inst);
24
25int save_trace_to_file(struct tracefs_instance *inst, const char *filename);
26int collect_registered_events(struct tep_event *tep, struct tep_record *record,
27 int cpu, void *context);