xref: /linux/tools/perf/util/print_insn.h (revision b2128290c29902315e632ea59e0504d6bc9e9b42)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef PERF_PRINT_INSN_H
3 #define PERF_PRINT_INSN_H
4 
5 #include <stddef.h>
6 #include <stdio.h>
7 
8 #include <linux/types.h>
9 
10 struct addr_location;
11 struct machine;
12 struct perf_insn;
13 struct perf_sample;
14 struct thread;
15 
16 #define PRINT_INSN_IMM_HEX		(1<<0)
17 
18 size_t sample__fprintf_insn_asm(struct perf_sample *sample, struct thread *thread,
19 				struct machine *machine, FILE *fp, struct addr_location *al);
20 size_t sample__fprintf_insn_raw(struct perf_sample *sample, FILE *fp);
21 ssize_t fprintf_insn_asm(struct machine *machine, struct thread *thread, u8 cpumode,
22 			 bool is64bit, const uint8_t *code, size_t code_size,
23 			 uint64_t ip, int *lenp, int print_opts, FILE *fp);
24 
25 #endif /* PERF_PRINT_INSN_H */
26