mini refactoring
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 13 Dec 2012 09:52:35 +0000 (13:52 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 13 Dec 2012 09:52:35 +0000 (13:52 +0400)
driver/us_proc_inst.c

index 30d6b85..8cdab8d 100644 (file)
@@ -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);