void copy_proc_form_img_to_sspt(struct img_proc *i_proc, struct sspt_proc *proc)
{
- char *file_name;
struct sspt_file *file;
struct ip_data ip_d;
- struct dentry *dentry;
struct img_file *i_file;
struct img_ip *i_ip;
list_for_each_entry(i_file, &i_proc->file_list, list) {
- dentry = i_file->dentry;
- file_name = dentry->d_iname;
- file = sspt_proc_find_file_or_new(proc, dentry, file_name);
+ file = sspt_proc_find_file_or_new(proc, i_file->dentry);
list_for_each_entry(i_ip, &i_file->ip_list, list) {
ip_d.flag_retprobe = 1;
name = (file->dentry) ? file->dentry->d_iname : NA;
printk("### print_file_probes: path=%s, d_iname=%s, table_size=%lu, vm_start=%lx\n",
- file->name, name, table_size, file->vm_start);
+ file->dentry->d_iname, name, table_size, file->vm_start);
for (i = 0; i < table_size; ++i) {
head = &file->page_probes_table[i];
return bits;
}
-struct sspt_file *sspt_file_create(char *name, struct dentry *dentry, int page_cnt)
+struct sspt_file *sspt_file_create(struct dentry *dentry, int page_cnt)
{
struct sspt_file *obj = kmalloc(sizeof(*obj), GFP_ATOMIC);
int i, table_size;
INIT_LIST_HEAD(&obj->list);
obj->proc = NULL;
- obj->name = name;
obj->dentry = dentry;
obj->loaded = 0;
obj->vm_start = 0;
if (file->vm_start > page || file->vm_end < page) {
// TODO: or panic?!
- printk("ERROR: file_p[vm_start..vm_end] <> page: file_p[vm_start=%lx, vm_end=%lx, path=%s, d_iname=%s] page=%lx\n",
- file->vm_start, file->vm_end, file->name, file->dentry->d_iname, page);
+ printk("ERROR: file_p[vm_start..vm_end] <> page: file_p[vm_start=%lx, vm_end=%lx, d_iname=%s] page=%lx\n",
+ file->vm_start, file->vm_end, file->dentry->d_iname, page);
return NULL;
}
file->vm_end = vma->vm_end;
ptr_pack_task_event_info(task, DYN_LIB_PROBE_ID, RECORD_ENTRY, "dspdd",
- task->tgid, file->name, vma->vm_start,
+ task->tgid, file->dentry->d_iname, vma->vm_start,
vma->vm_end - vma->vm_start, 0);
}
struct list_head list; // for proc_probes
struct sspt_proc *proc;
struct dentry *dentry;
- char *name;
int loaded;
unsigned long vm_start;
unsigned long vm_end;
};
-struct sspt_file *sspt_file_create(char *name, struct dentry *dentry, int page_cnt);
+struct sspt_file *sspt_file_create(struct dentry *dentry, int page_cnt);
void sspt_file_free(struct sspt_file *file);
struct sspt_page *sspt_find_page_mapped(struct sspt_file *file, unsigned long page);
}
struct sspt_file *sspt_proc_find_file_or_new(struct sspt_proc *proc,
- struct dentry *dentry, char *name)
+ struct dentry *dentry)
{
struct sspt_file *file;
file = sspt_proc_find_file(proc, dentry);
if (file == NULL) {
- file = sspt_file_create(name, dentry, 10);
+ file = sspt_file_create(dentry, 10);
sspt_proc_add_file(proc, file);
}
struct sspt_file *sspt_proc_find_file(struct sspt_proc *proc, struct dentry *dentry);
struct sspt_file *sspt_proc_find_file_or_new(struct sspt_proc *proc,
- struct dentry *dentry, char *name);
+ struct dentry *dentry);
void sspt_proc_install_page(struct sspt_proc *proc, unsigned long page_addr);
void sspt_proc_install(struct sspt_proc *proc);