From: Vyacheslav Cherkashin Date: Sun, 14 Jul 2013 08:46:14 +0000 (+0400) Subject: [IMPROVE] On/Off the UserSpaceInst X-Git-Tag: Tizen_SDK_2.3~370^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7804cbf0287573d499fed56675db1b836e986aa;p=kernel%2Fswap-modules.git [IMPROVE] On/Off the UserSpaceInst --- 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,