summaryrefslogtreecommitdiff
path: root/writer
diff options
context:
space:
mode:
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>2013-07-22 14:27:08 +0400
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>2013-07-22 14:32:54 +0400
commit78975ec34b6a4e9b1521b300dab9ea2324af288b (patch)
treea42cc57ef092402d13dabbe0861479b3e1f59b02 /writer
parent93bedd49f12b7185c6a9d43eec94c6f683934e35 (diff)
downloadswap-modules-78975ec34b6a4e9b1521b300dab9ea2324af288b.tar.gz
swap-modules-78975ec34b6a4e9b1521b300dab9ea2324af288b.tar.bz2
swap-modules-78975ec34b6a4e9b1521b300dab9ea2324af288b.zip
[PROTO] probe subtype is a bitmask now
Diffstat (limited to 'writer')
-rw-r--r--writer/swap_writer_module.c8
-rw-r--r--writer/swap_writer_module.h16
2 files changed, 12 insertions, 12 deletions
diff --git a/writer/swap_writer_module.c b/writer/swap_writer_module.c
index e1880ec0..8bc2c7e6 100644
--- a/writer/swap_writer_module.c
+++ b/writer/swap_writer_module.c
@@ -387,7 +387,7 @@ struct msg_func_entry {
} __attribute__((packed));
static char *pack_msg_func_entry(char *payload, const char *fmt, struct pt_regs *regs,
- enum PROBE_TYPE pt, enum PROBE_SUB_TYPE pst)
+ enum PROBE_TYPE pt, int sub_type)
{
struct msg_func_entry *mfe = (struct msg_func_entry *)payload;
struct task_struct *task = current;
@@ -399,7 +399,7 @@ static char *pack_msg_func_entry(char *payload, const char *fmt, struct pt_regs
//TODO ret address for x86!
mfe->caller_pc_addr = get_regs_ret_func(regs);
mfe->probe_type = pt;
- mfe->probe_sub_type = pst;
+ mfe->probe_sub_type = sub_type;
mfe->cnt_args = strlen(fmt);
return payload + sizeof(*mfe);
@@ -488,14 +488,14 @@ static int pack_args(char *buf, int len, const char *fmt, struct pt_regs *regs)
}
int entry_event(const char *fmt, struct pt_regs *regs,
- enum PROBE_TYPE pt, enum PROBE_SUB_TYPE pst)
+ enum PROBE_TYPE pt, int sub_type)
{
char *buf, *payload, *args, *buf_end;
int ret;
buf = get_current_buf();
payload = pack_basic_msg_fmt(buf, MSG_FUNCTION_ENTRY);
- args = pack_msg_func_entry(payload, fmt, regs, pt, pst);
+ args = pack_msg_func_entry(payload, fmt, regs, pt, sub_type);
/* FIXME: len = 1024 */
ret = pack_args(args, 1024, fmt, regs);
diff --git a/writer/swap_writer_module.h b/writer/swap_writer_module.h
index a25fcab8..6db64cf1 100644
--- a/writer/swap_writer_module.h
+++ b/writer/swap_writer_module.h
@@ -34,13 +34,13 @@ enum PROBE_TYPE {
};
enum PROBE_SUB_TYPE {
- PST_NONE = 0,
- PST_KS_FILE = 1,
- PST_KS_IPC = 2,
- PST_KS_PROCESS = 3,
- PST_KS_SIGNAL = 4,
- PST_KS_NETWORK = 5,
- PST_KS_DESK = 6
+ PST_NONE = 0x00,
+ PST_KS_FILE = 0x01,
+ PST_KS_IPC = 0x02,
+ PST_KS_PROCESS = 0x04,
+ PST_KS_SIGNAL = 0x08,
+ PST_KS_NETWORK = 0x10,
+ PST_KS_DESK = 0x20
};
struct pt_regs;
@@ -56,7 +56,7 @@ int proc_info_msg(struct task_struct *task, void *priv);
int sample_msg(struct pt_regs *regs);
int entry_event(const char *fmt, struct pt_regs *regs,
- enum PROBE_TYPE pt, enum PROBE_SUB_TYPE pst);
+ enum PROBE_TYPE pt, int sub_type);
int exit_event(struct pt_regs *regs);
int switch_entry(struct pt_regs *regs);