123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- #ifndef __TRACE_H
- #define __TRACE_H
- enum {
-
- FUNC_SITE_SIZE = 4,
- };
- enum trace_chunk_type {
- TRACE_CHUNK_FUNCS,
- TRACE_CHUNK_CALLS,
- };
- struct trace_output_func {
- uint32_t offset;
- uint32_t call_count;
- };
- struct trace_output_hdr {
- enum trace_chunk_type type;
- uint32_t rec_count;
- };
- void trace_print_stats(void);
- int trace_list_functions(void *buff, int buff_size, unsigned *needed);
- enum ftrace_flags {
- FUNCF_EXIT = 0UL << 30,
- FUNCF_ENTRY = 1UL << 30,
- FUNCF_TEXTBASE = 2UL << 30,
- FUNCF_TIMESTAMP_MASK = 0x3fffffff,
- };
- #define TRACE_CALL_TYPE(call) ((call)->flags & 0xc0000000UL)
- struct trace_call {
- uint32_t func;
- uint32_t caller;
- uint32_t flags;
- };
- int trace_list_calls(void *buff, int buff_size, unsigned int *needed);
- void trace_set_enabled(int enabled);
- int trace_early_init(void);
- int trace_init(void *buff, size_t buff_size);
- #endif
|