rename proc_p_find_file_p_by_dentry --> sspt_procs_find_file_or_new
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 29 Jan 2013 14:57:50 +0000 (18:57 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 29 Jan 2013 14:57:50 +0000 (18:57 +0400)
driver/sspt/sspt_procs.c
driver/sspt/sspt_procs.h
driver/us_proc_inst.c

index d34a136..265f602 100644 (file)
@@ -78,8 +78,8 @@ static void sspt_procs_add_file(struct sspt_procs *procs, struct sspt_file *file
        list_add(&file->list, &procs->file_list);
 }
 
-struct sspt_file *proc_p_find_file_p_by_dentry(struct sspt_procs *procs,
-               const char *name, struct dentry *dentry)
+struct sspt_file *sspt_procs_find_file_or_new(struct sspt_procs *procs,
+               struct dentry *dentry, const char *name)
 {
        struct sspt_file *file;
 
@@ -99,7 +99,7 @@ void proc_p_add_dentry_probes(struct sspt_procs *procs, const char *name,
                struct dentry* dentry, struct ip_data *ip_d, int cnt)
 {
        int i;
-       struct sspt_file *file = proc_p_find_file_p_by_dentry(procs, name, dentry);
+       struct sspt_file *file = sspt_procs_find_file_or_new(procs, dentry, name);
 
        for (i = 0; i < cnt; ++i) {
                sspt_file_add_ip(file, &ip_d[i]);
index d85d644..0692f58 100644 (file)
@@ -43,8 +43,8 @@ void sspt_procs_free_all(void);
 
 void proc_p_add_dentry_probes(struct sspt_procs *procs, const char *name,
                struct dentry* dentry, struct ip_data *ip_d, int cnt);
-struct sspt_file *proc_p_find_file_p_by_dentry(struct sspt_procs *procs,
-               const char *name, struct dentry *dentry);
+struct sspt_file *sspt_procs_find_file_or_new(struct sspt_procs *procs,
+               struct dentry *dentry, const char *name);
 struct sspt_file *sspt_procs_find_file(struct sspt_procs *procs, struct dentry *dentry);
 
 #endif /* __SSPT_PROC__ */
index 89343d4..ffb29ce 100644 (file)
@@ -605,7 +605,7 @@ int install_otg_ip(unsigned long addr,
                                        .flag_retprobe = 1
                        };
 
-                       struct sspt_file *file = proc_p_find_file_p_by_dentry(procs, name, dentry);
+                       struct sspt_file *file = sspt_procs_find_file_or_new(procs, dentry, name);
                        struct sspt_page *page = sspt_get_page(file, offset_addr);
                        struct us_ip *ip = sspt_find_ip(page, offset_addr & ~PAGE_MASK);
 
@@ -615,7 +615,8 @@ int install_otg_ip(unsigned long addr,
                        }
 
                        if (ip == NULL) {
-                               struct sspt_file *file = proc_p_find_file_p_by_dentry(procs, name, dentry);
+                               // TODO: sspt_procs_find_file_or_new --> sspt_procs_find_file ?!
+                               struct sspt_file *file = sspt_procs_find_file_or_new(procs, dentry, name);
                                sspt_file_add_ip(file, &pd);
 
                                /* if addr mapping, that probe install, else it be installed in do_page_fault handler */