5 * @file us_manager/sspt/sspt_file.h
6 * @author Vyacheslav Cherkashin <v.cherkashin@samsung.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 * Copyright (C) Samsung Electronics, 2013
28 #include <linux/types.h>
31 struct vm_area_struct;
35 * @breaf Image of file for specified process
38 struct list_head list; /**< For sspt_proc */
39 struct sspt_proc *proc; /**< Pointer to the proc (parent) */
40 struct dentry *dentry; /**< Dentry of file */
41 unsigned long vm_start; /**< VM start */
42 unsigned long vm_end; /**< VM end */
44 unsigned long page_probes_hash_bits; /**< Hash-table size */
45 struct hlist_head *page_probes_table; /**< Hash-table for pages */
47 unsigned loaded:1; /**< Flag of loading */
51 struct sspt_file *sspt_file_create(struct dentry *dentry, int page_cnt);
52 void sspt_file_free(struct sspt_file *file);
54 struct sspt_page *sspt_find_page_mapped(struct sspt_file *file,
56 void sspt_file_add_ip(struct sspt_file *file, unsigned long offset,
57 struct probe_info *probe_i);
59 void sspt_file_on_each_ip(struct sspt_file *file,
60 void (*func)(struct us_ip *, void *), void *data);
62 struct sspt_page *sspt_get_page(struct sspt_file *file,
63 unsigned long offset_addr);
64 void sspt_put_page(struct sspt_page *page);
66 int sspt_file_check_install_pages(struct sspt_file *file);
67 void sspt_file_install(struct sspt_file *file);
68 int sspt_file_uninstall(struct sspt_file *file,
69 struct task_struct *task,
71 void sspt_file_set_mapping(struct sspt_file *file, struct vm_area_struct *vma);
73 #endif /* __SSPT_FILE__ */