#include "sspt/sspt_procs.h"
-extern unsigned long imi_sum_time;
-extern unsigned long imi_sum_hit;
-
-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
static BLOCKING_NOTIFIER_HEAD(swap_notifier_list);
#endif
int j;
dbi_module_callback dmc_stop;
- printk("\n### imi_sum_time = %ld in install_mapped_ips()\n", imi_sum_time);
- printk("### imi_sum_hit = %ld in install_mapped_ips()\n", imi_sum_hit);
-
- if (imi_sum_hit != 0) {
- printk("### time = %ld in install_mapped_ips()\n", imi_sum_time/imi_sum_hit);
- }
-
- imi_sum_time = 0;
- imi_sum_hit = 0;
-
local_mh = get_dbi_modules_handlers();
if(ec_user_stop() != 0) {
result = -1;
return 0;
}
-unsigned long imi_sum_time = 0;
-unsigned long imi_sum_hit = 0;
-
static void set_mapping_file(struct sspt_file *file,
const struct sspt_procs *procs,
const struct task_struct *task,
unsigned long addr = 0;
int valid_addr;
- // overhead
- struct timeval imi_tv1;
- struct timeval imi_tv2;
-#define USEC_IN_SEC_NUM 1000000
-
if (task->flags & PF_KTHREAD) {
goto out;
}
if (procs) {
unsigned long page = addr & PAGE_MASK;
-
- // overhead
- do_gettimeofday(&imi_tv1);
install_page_probes(page, task, procs, 1);
- do_gettimeofday(&imi_tv2);
- imi_sum_hit++;
- imi_sum_time += ((imi_tv2.tv_sec - imi_tv1.tv_sec) * USEC_IN_SEC_NUM +
- (imi_tv2.tv_usec - imi_tv1.tv_usec));
}
out:
struct us_proc_ip_t;
struct us_ip;
-extern unsigned long imi_sum_time;
-extern unsigned long imi_sum_hit;
-
extern struct list_head proc_probes_list;
int register_usprobe(struct task_struct *task, struct us_ip *ip, int atomic);