[REFACTOR] move and rename install_file_probes()
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 7 May 2013 13:35:05 +0000 (17:35 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 7 May 2013 13:35:05 +0000 (17:35 +0400)
move:
from src/modules/driver/us_proc_inst.c
to src/modules/driver/sspt/sspt_file.c

rename:
install_file_probes() --> sspt_file_install()

driver/sspt/sspt_file.c
driver/sspt/sspt_file.h
driver/us_proc_inst.c

index e36ae71..49d92a9 100644 (file)
@@ -224,3 +224,18 @@ int sspt_file_check_install_pages(struct sspt_file *file)
 
        return 0;
 }
+
+void sspt_file_install(struct sspt_file *file)
+{
+       struct sspt_page *page = NULL;
+       struct hlist_node *node = NULL;
+       struct hlist_head *head = NULL;
+       int i, table_size = (1 << file->page_probes_hash_bits);
+
+       for (i = 0; i < table_size; ++i) {
+               head = &file->page_probes_table[i];
+               swap_hlist_for_each_entry_rcu(page, node, head, hlist) {
+                       sspt_register_page(page, file);
+               }
+       }
+}
index 52b8871..14e8b4f 100644 (file)
@@ -54,5 +54,6 @@ struct sspt_page *sspt_get_page(struct sspt_file *file, unsigned long offset_add
 void sspt_put_page(struct sspt_page *page);
 
 int sspt_file_check_install_pages(struct sspt_file *file);
+void sspt_file_install(struct sspt_file *file);
 
 #endif /* __SSPT_FILE__ */
index 4cf1d50..57f966c 100644 (file)
@@ -369,21 +369,6 @@ void install_page_probes(unsigned long page_addr, struct task_struct *task, stru
        mm_read_unlock(mm, atomic, lock);
 }
 
-static void install_file_probes(struct sspt_file *file)
-{
-       struct sspt_page *page = NULL;
-       struct hlist_node *node = NULL;
-       struct hlist_head *head = NULL;
-       int i, table_size = (1 << file->page_probes_hash_bits);
-
-       for (i = 0; i < table_size; ++i) {
-               head = &file->page_probes_table[i];
-               swap_hlist_for_each_entry_rcu(page, node, head, hlist) {
-                       sspt_register_page(page, file);
-               }
-       }
-}
-
 void install_proc_probes(struct task_struct *task, struct sspt_procs *procs)
 {
        int lock, atomic;
@@ -403,7 +388,7 @@ void install_proc_probes(struct task_struct *task, struct sspt_procs *procs)
                                        file->loaded = 1;
                                }
 
-                               install_file_probes(file);
+                               sspt_file_install(file);
                        }
                }
        }