From 149c98b4697d1088da202e854e7c3df0d2c556c2 Mon Sep 17 00:00:00 2001 From: Vyacheslav Cherkashin Date: Thu, 13 Dec 2012 13:52:35 +0400 Subject: [PATCH] mini refactoring --- driver/us_proc_inst.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/driver/us_proc_inst.c b/driver/us_proc_inst.c index 30d6b85..8cdab8d 100644 --- a/driver/us_proc_inst.c +++ b/driver/us_proc_inst.c @@ -1440,9 +1440,7 @@ void do_page_fault_ret_pre_code (void) * we instrument only group_leader of all this threads */ struct task_struct *task = current->group_leader; - - unsigned long addr = 0, page = 0; - + unsigned long addr = 0; // overhead struct timeval imi_tv1; @@ -1465,8 +1463,6 @@ void do_page_fault_ret_pre_code (void) return; } - page = addr & PAGE_MASK; - if (is_libonly()) { task_inst_info = get_task_inst_node(task); if (task_inst_info == NULL) { @@ -1495,6 +1491,8 @@ void do_page_fault_ret_pre_code (void) } if (task_inst_info) { + unsigned long page = addr & PAGE_MASK; + #ifdef __ANDROID if (is_java_inst_enabled()) { find_libdvm_for_task(task, &us_proc_info); -- 2.7.4