This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangyang-variable-monitor/source/module/monitor_kernel.h

27 lines
701 B
C
Raw Normal View History

2023-11-16 17:39:26 +08:00
#include "monitor_kallsyms.h"
#include "monitor_mem.h"
2023-11-27 22:22:30 -05:00
#include "monitor_proc.h"
2023-11-16 17:39:26 +08:00
#include "monitor_timer.h"
#include "monitor_trace.h"
2023-11-16 13:17:49 +08:00
2023-11-27 20:59:18 -05:00
// ioctl
2023-11-27 20:51:25 -05:00
#define IOCTL_WATCH_VARIABLE 0
#define IOCTL_DUMP_LOG 1
2023-11-27 22:22:30 -05:00
// default value
extern int def_interval_ns;
extern int dump_reset_sec;
2023-11-16 17:39:26 +08:00
extern mm_tree mm_tree_struct;
2023-11-27 15:16:35 +08:00
extern struct diag_variant_buffer load_monitor_variant_buffer; // global buffer
2023-11-16 13:17:49 +08:00
2023-11-27 22:22:30 -05:00
int monitor_init(void); // monitor init
2023-11-27 15:16:35 +08:00
void monitor_exit(void); // monitor exit
2023-11-16 13:17:49 +08:00
2023-11-27 15:16:35 +08:00
int start_watch_variable(watch_arg warg); // for open
2023-11-27 22:22:30 -05:00
void clear_watch(pid_t pid); // for release
2023-11-16 21:15:51 -05:00
2023-11-27 22:22:30 -05:00
enum hrtimer_restart
check_variable_cb(struct hrtimer *timer); // hrtimer callback
2023-11-23 00:29:21 -05:00
2023-11-27 22:22:30 -05:00
int diag_test(int nid); // for test