From e7804cbf0287573d499fed56675db1b836e986aa Mon Sep 17 00:00:00 2001 From: Vyacheslav Cherkashin Date: Sun, 14 Jul 2013 12:46:14 +0400 Subject: [PATCH] [IMPROVE] On/Off the UserSpaceInst --- parser/features.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/parser/features.c b/parser/features.c index 2a9a42f..b530dd0 100644 --- a/parser/features.c +++ b/parser/features.c @@ -18,6 +18,24 @@ enum features_list { func_sampling = (1 << 19) /* Function sampling */ }; +int set_us_inst(struct conf_data *conf) +{ + int ret; + + ret = usm_start(); + + return ret; +} + +int unset_us_inst(void) +{ + int ret; + + ret = usm_stop(); + + return ret; +} + int set_syscall_file(struct conf_data *conf) { int ret; @@ -164,6 +182,12 @@ struct feature_item { int (*unset)(void); }; +static struct feature_item feature_us_inst = { + .name = "user space instrumentation", + .set = set_us_inst, + .unset = unset_us_inst +}; + static struct feature_item feature_syscall_file = { .name = "file operation syscalls", .set = set_syscall_file, @@ -215,7 +239,7 @@ static struct feature_item feature_func_sampling = { static struct feature_item *feature_list[] = { /* 0 */ NULL, /* 1 */ NULL, - /* 2 */ NULL, + /* 2 */ &feature_us_inst, /* 3 */ NULL, /* 4 */ NULL, /* 5 */ NULL, -- 2.7.4