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;
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]);
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__ */
.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);
}
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 */