xref: /linux/tools/perf/jvmti/jvmti_agent.h (revision 64282ea2d2a90437c0739ce016b80a1dec16507e)
1 #ifndef __JVMTI_AGENT_H__
2 #define __JVMTI_AGENT_H__
3 
4 #include <sys/types.h>
5 #include <stdint.h>
6 #include <jvmti.h>
7 
8 #if defined(__cplusplus)
9 extern "C" {
10 #endif
11 
12 typedef struct {
13 	unsigned long	pc;
14 	int		line_number;
15 	int		discrim; /* discriminator -- 0 for now */
16 } jvmti_line_info_t;
17 
18 void *jvmti_open(void);
19 int   jvmti_close(void *agent);
20 int   jvmti_write_code(void *agent, char const *symbol_name,
21 		       uint64_t vma, void const *code,
22 		       const unsigned int code_size);
23 
24 int   jvmti_write_debug_info(void *agent,
25 		             uint64_t code,
26 			     const char *file,
27 			     jvmti_line_info_t *li,
28 			     int nr_lines);
29 
30 #if defined(__cplusplus)
31 }
32 
33 #endif
34 #endif /* __JVMTI_H__ */
35