3 * modules/writer/swap_writer_module.h
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 * Copyright (C) Samsung Electronics, 2013
21 * 2013 Alexander Aksenov <a.aksenov@samsung.com>, Vyacheslav Cherkashin:
22 * SWAP Writer module implement
29 #include <linux/types.h>
40 PST_KS_PROCESS = 0x04,
42 PST_KS_NETWORK = 0x10,
49 struct vm_area_struct;
51 int init_msg(size_t buf_size);
52 void uninit_msg(void);
54 void reset_discarded(void);
55 unsigned int get_discarded_count(void);
56 void reset_seq_num(void);
58 int proc_info_msg(struct task_struct *task, struct dentry *dentry);
59 void pcoc_map_msg(struct vm_area_struct *vma);
60 void proc_unmap_msg(unsigned long start, unsigned long end);
61 int sample_msg(struct pt_regs *regs);
63 int entry_event(const char *fmt, unsigned long func_addr, struct pt_regs *regs,
64 enum PROBE_TYPE pt, int sub_type);
65 int exit_event(char ret_type, struct pt_regs *regs, unsigned long func_addr,
66 unsigned long ret_addr);
68 int switch_entry(struct pt_regs *regs);
69 int switch_exit(struct pt_regs *regs);
71 int error_msg(const char *fmt, ...);
73 int raw_msg(char *buf, size_t len);
75 #endif /* _SWAP_MSG_H */