wsi: remove feature 10/153910/1
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 3 Oct 2017 07:33:56 +0000 (10:33 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 3 Oct 2017 09:06:12 +0000 (12:06 +0300)
Change-Id: I9d28a5af96efbdeb40f26cdd22258337e45c39ab
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
Kbuild
pack.sh
parser/msg_parser.c
us_manager/probes/probes.h
webprobe/Kbuild [deleted file]
webprobe/web_msg.c [deleted file]
webprobe/web_msg.h [deleted file]
webprobe/webprobe.c [deleted file]
webprobe/webprobe.h [deleted file]
webprobe/webprobe_debugfs.c [deleted file]
webprobe/webprobe_debugfs.h [deleted file]

diff --git a/Kbuild b/Kbuild
index b1a0574105f686143ce34b5e08dcaf3eddc10256..007e021175db9a682bf8949773ab026ddf41d3d4 100644 (file)
--- a/Kbuild
+++ b/Kbuild
@@ -17,7 +17,6 @@ obj-m := master/ \
          energy/ \
          parser/ \
          retprobe/ \
-         webprobe/ \
          preload/ \
          fbiprobe/ \
          wsp/ \
diff --git a/pack.sh b/pack.sh
index 9bf0875afe88dbdad3774230f89e3e5bbd14fcc7..3186cbc331112fedd23e373d2d87ca9f67dd91dc 100755 (executable)
--- a/pack.sh
+++ b/pack.sh
@@ -26,7 +26,6 @@ modules="master/swap_master.ko
         energy/swap_energy.ko
         parser/swap_message_parser.ko
         retprobe/swap_retprobe.ko
-        webprobe/swap_webprobe.ko
         loader/swap_loader.ko
         preload/swap_preload.ko
         uihv/swap_uihv.ko
index d35952db9af04020353984e52d4271fb6c2b28d3..285da4df08942144c9691d1f7f3142723d987abf 100644 (file)
@@ -307,25 +307,6 @@ static int cmp_retprobe(struct probe_info *p0, struct probe_info *p1)
        return 1;
 }
 
-/**
- * @brief Gets webprobe data and puts it to the probe_info struct.
- *
- * @param mb Pointer to the message buffer.
- * @param pd Pointer to the probe_desc struct.
- * @return 0 on success, error code on error.
- */
-int get_webprobe(struct msg_buf *mb, struct probe_desc *pd)
-{
-       pd->type = SWAP_WEBPROBE;
-
-       return 0;
-}
-
-static int cmp_webprobe(struct probe_info *p0, struct probe_info *p1)
-{
-       return 0;
-}
-
 /**
  * @brief Gets preload data and puts it to the probe_info struct.
  *
@@ -656,9 +637,6 @@ struct pr_probe_desc *pr_probe_desc_create(struct msg_buf *mb)
        case SWAP_RETPROBE:
                get_probe = get_retprobe;
                break;
-       case SWAP_WEBPROBE:
-               get_probe = get_webprobe;
-               break;
        case SWAP_PRELOAD_PROBE:
                get_probe = get_preload_probe;
                break;
@@ -706,8 +684,6 @@ void pr_probe_desc_free(struct pr_probe_desc *probe)
        case SWAP_RETPROBE:
                put_retprobe(&(probe->p_desc.info));
                break;
-       case SWAP_WEBPROBE:
-               break;
        case SWAP_PRELOAD_PROBE:
                put_preload_probe(&(probe->p_desc.info));
                break;
@@ -745,9 +721,6 @@ int probe_inst_info_cmp(struct pr_probe_desc *p0, struct pr_probe_desc *p1)
        case SWAP_RETPROBE:
                cmp_probe = cmp_retprobe;
                break;
-       case SWAP_WEBPROBE:
-               cmp_probe = cmp_webprobe;
-               break;
        case SWAP_PRELOAD_PROBE:
                cmp_probe = cmp_preload_probe;
                break;
index f6dec06dc9ab8881a6456193b327634d82581736..8683006ecb4a18883e25ecf81936bbe6196d59da 100644 (file)
@@ -50,7 +50,6 @@ enum probe_t {
        SWAP_RETPROBE = 0,          /* Retprobe */
        SWAP_FBIPROBE = 1,          /* FBI probe */
        SWAP_PRELOAD_PROBE = 2,     /* Preload probe */
-       SWAP_WEBPROBE = 3,          /* Webprobe */
        SWAP_GET_CALLER = 4,        /* Get caller probe. Supports preload */
        SWAP_GET_CALL_TYPE = 5,     /* Get call type probe. Supports preload */
        SWAP_WRITE_MSG = 6,         /* Write messages from user space directly to 
diff --git a/webprobe/Kbuild b/webprobe/Kbuild
deleted file mode 100644 (file)
index fd39693..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-EXTRA_CFLAGS := $(extra_cflags)
-
-obj-m := swap_webprobe.o
-swap_webprobe-y := webprobe.o \
-                   webprobe_debugfs.o \
-                   web_msg.o
diff --git a/webprobe/web_msg.c b/webprobe/web_msg.c
deleted file mode 100644 (file)
index e94b895..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- *
- * Copyright (C) Samsung Electronics, 2015
- *
- * 2015         Vyacheslav Cherkashin <v.cherkashin@samsung.com>
- *
- */
-
-#include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/stddef.h>
-#include <linux/uaccess.h>
-#include <writer/swap_msg.h>
-#include <writer/event_filter.h>
-#include <swap-asm/swap_uprobes.h>
-#include "web_msg.h"
-
-#define WEB_PREFIX      KERN_INFO "[WEB_PROF] "
-/* TODO: develop method for obtaining this data during build... */
-#define LINE_NUMBER_OFFSET             16
-#define FUNCTION_NAME_OFFSET           8
-#define SOURCE_FILE_NAME_OFFSET                12
-
-static long pack_str_form_user(void *data, size_t size, const char __user *s)
-{
-       long ret, len;
-
-       if (!size)
-               return -ENOMEM;
-
-       ret = strncpy_from_user(data, s, size);
-       if (ret < 0) {
-               pr_err(WEB_PREFIX "failed to get userspace string s=%p\n", s);
-               return ret;
-
-       } else if (ret == size) {
-               pr_warn(WEB_PREFIX "user string is very long ret=%ld\n", ret);
-               len = ret;
-       } else {
-               len = ret + 1;
-       }
-
-       ((char *)data)[len - 1] = '\0';
-
-       return len;
-}
-
-void web_sample_msg(struct pt_regs *regs)
-{
-       struct task_struct *task = current;
-       struct swap_msg *m;
-       void *p;
-       size_t old_size, size;
-       long ret;
-       void __user *obj_ptr;
-       int line;
-       int __user *line_number_ptr;
-       const char __user **func_name_ptr;
-       const char __user *func_name;
-       const char __user **file_name_ptr;
-       const char __user *file_name;
-
-       if (!check_event(task))
-               return;
-
-       /* Get opbject pointer */
-       obj_ptr = (void __user *)swap_get_uarg(regs, 1);
-
-       m = swap_msg_get(MSG_WEB_PROFILING);
-       p = swap_msg_payload(m);
-       old_size = size = swap_msg_size(m);
-
-       /* Type */
-       *(u8 *)p = WEB_MSG_SAMPLING;
-       p += sizeof(u8);
-       size -= sizeof(u8);
-
-       /* PID */
-       *(u32 *)p = task->tgid;
-       p += sizeof(u32);
-       size -= sizeof(u32);
-
-       /* TID */
-       *(u32 *)p = task->pid;
-       p += sizeof(u32);
-       size -= sizeof(u32);
-
-       /* Line number (in source file) */
-       line_number_ptr = obj_ptr + LINE_NUMBER_OFFSET;
-       if (get_user(line, line_number_ptr)) {
-               pr_err("failed to get line number\n");
-               goto out;
-       }
-       *(u32 *)p = (u32)line;
-       p += sizeof(u32);
-       size -= sizeof(u32);
-
-       /* Get function name string pointer */
-       func_name_ptr = obj_ptr + FUNCTION_NAME_OFFSET;
-       if (get_user(func_name, func_name_ptr)) {
-               pr_err("failed to get function name\n");
-               goto out;
-       }
-       ret = pack_str_form_user(p, size, func_name);
-       if (ret < 0)
-               goto out;
-       p += ret;
-       size -= ret;
-
-       /* Get source file name string pointer */
-       file_name_ptr = obj_ptr + SOURCE_FILE_NAME_OFFSET;
-       if (get_user(file_name, file_name_ptr)) {
-               pr_err("failed to get file name\n");
-               goto out;
-       }
-       ret = pack_str_form_user(p, size, file_name);
-       if (ret < 0)
-               goto out;
-       size -= ret;
-
-       swap_msg_flush(m, old_size - size);
-
-out:
-       swap_msg_put(m);
-}
diff --git a/webprobe/web_msg.h b/webprobe/web_msg.h
deleted file mode 100644 (file)
index 9170854..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- *
- * Copyright (C) Samsung Electronics, 2015
- *
- * 2015         Vyacheslav Cherkashin <v.cherkashin@samsung.com>
- *
- */
-
-#ifndef _WEB_MSG_H
-#define _WEB_MSG_H
-
-struct pt_regs;
-
-/* Web messages subtype */
-enum web_msg_type {
-       WEB_MSG_SAMPLING        = 0x00,
-};
-
-void web_msg_entry(struct pt_regs *regs);
-void web_msg_exit(struct pt_regs *regs);
-void web_sample_msg(struct pt_regs *regs);
-
-#endif /* _WEB_MSG_H */
diff --git a/webprobe/webprobe.c b/webprobe/webprobe.c
deleted file mode 100644 (file)
index c88dbf6..0000000
+++ /dev/null
@@ -1,275 +0,0 @@
-/**
- * webprobe/webprobe.c
- * @author Ruslan Soloviev
- *
- * @section LICENSE
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- *
- * @section COPYRIGHT
- *
- * Copyright (C) Samsung Electronics, 2014
- *
- * @section DESCRIPTION
- *
- * Web application profiling
- */
-
-#include <linux/module.h>
-#include <linux/slab.h>
-#include <us_manager/us_manager.h>
-#include <us_manager/pf/pf_group.h>
-#include <us_manager/probes/probe_info_new.h>
-#include <uprobe/swap_uprobes.h>
-#include <parser/msg_cmd.h>
-#include <master/swap_initializer.h>
-
-#include "webprobe.h"
-#include "webprobe_debugfs.h"
-#include "web_msg.h"
-
-struct web_prof_data {
-       struct dentry *app_dentry;
-       struct dentry *lib_dentry;
-       struct pf_group *pfg;
-       u64 inspserver_addr;
-       u64 tick_addr;
-
-       struct probe_new inspserver_probe;
-       struct probe_new tick_probe;
-
-       bool enable;
-};
-
-static DEFINE_MUTEX(web_mutex);
-static const char *CHROMIUM_EWK = "/usr/lib/libchromium-ewk.so";
-static struct web_prof_data *web_data;
-
-/* function tick handler */
-static int tick_handler(struct uprobe *p, struct pt_regs *regs);
-static struct probe_desc pin_tick_handler = MAKE_UPROBE(tick_handler);
-
-/* function inspector port */
-static int insport_rhandler(struct uretprobe_instance *ri,
-                           struct pt_regs *regs);
-static struct probe_desc pin_insport_rhandler =
-                               MAKE_URPROBE(NULL, insport_rhandler, 0);
-
-static int insport_rhandler(struct uretprobe_instance *ri,
-                           struct pt_regs *regs)
-{
-       set_wrt_launcher_port((int)regs_return_value(regs));
-
-       return 0;
-}
-
-static int tick_handler(struct uprobe *p, struct pt_regs *regs)
-{
-       web_sample_msg(regs);
-
-       return 0;
-}
-
-u64 *web_prof_addr_ptr(enum web_prof_addr_t type)
-{
-       u64 *addr_ptr;
-
-       mutex_lock(&web_mutex);
-       switch (type) {
-       case INSPSERVER_START:
-               addr_ptr = &web_data->inspserver_addr;
-               break;
-       case TICK_PROBE:
-               addr_ptr = &web_data->tick_addr;
-               break;
-       default:
-               pr_err("ERROR: WEB_PROF_ADDR_PTR_TYPE=0x%x\n", type);
-               addr_ptr = NULL;
-       }
-       mutex_unlock(&web_mutex);
-
-       return addr_ptr;
-}
-
-int web_prof_data_set(char *app_path, char *app_id)
-{
-       int ret = 0;
-
-       mutex_lock(&web_mutex);
-       web_data->app_dentry = dentry_by_path(app_path);
-       if (!web_data->app_dentry) {
-               ret = -EFAULT;
-               goto out;
-       }
-
-       web_data->lib_dentry = dentry_by_path(CHROMIUM_EWK);
-       if (!web_data->lib_dentry) {
-               ret = -EFAULT;
-               goto out;
-       }
-
-       if (web_data->pfg) {
-               put_pf_group(web_data->pfg);
-               web_data->pfg = NULL;
-       }
-
-       web_data->pfg = get_pf_group_by_comm(app_id, web_data->app_dentry);
-       if (!web_data->pfg) {
-               ret = -EFAULT;
-               goto out;
-       }
-
-out:
-       mutex_unlock(&web_mutex);
-
-       return 0;
-}
-
-bool web_prof_enabled(void)
-{
-       bool ret;
-
-       mutex_lock(&web_mutex);
-       ret = web_data->enable;
-       mutex_unlock(&web_mutex);
-
-       return ret;
-}
-
-static void __web_prof_disable(struct web_prof_data *data)
-{
-       pin_unregister(&data->tick_probe, data->pfg);
-       pin_unregister(&data->inspserver_probe, data->pfg);
-}
-
-static int __web_prof_enable(struct web_prof_data *data)
-{
-       int ret;
-
-       data->tick_probe.offset = (unsigned long)data->tick_addr;
-       data->tick_probe.desc = &pin_tick_handler;
-       ret = pin_register(&data->tick_probe, data->pfg, data->lib_dentry);
-       if (ret)
-               goto fail0;
-
-       data->inspserver_probe.offset = (unsigned long)data->inspserver_addr;
-       data->inspserver_probe.desc = &pin_insport_rhandler;
-       ret = pin_register(&data->inspserver_probe, data->pfg,
-                          data->lib_dentry);
-       if (ret)
-               goto fail1;
-
-       return 0;
-
-fail1:
-       pin_unregister(&data->tick_probe, data->pfg);
-fail0:
-       return ret;
-}
-
-int web_prof_enable(void)
-{
-       int ret = 0;
-
-       mutex_lock(&web_mutex);
-       if (web_data->enable) {
-               pr_err("ERROR: Web profiling is already enabled\n");
-               ret = -EBUSY;
-               goto out;
-       }
-
-       if (!web_data->inspserver_addr) {
-               pr_err("bad inspserver addr 0x%llx\n",
-                      web_data->inspserver_addr);
-               goto out;
-       }
-
-       if (!web_data->tick_addr) {
-               pr_err("bad tick addr 0x%llx\n", web_data->tick_addr);
-               goto out;
-       }
-
-       ret = __web_prof_enable(web_data);
-       if (ret) {
-               pr_err("failed to enable Web profiling\n");
-               goto out;
-       }
-
-       web_data->enable = true;
-
-out:
-       mutex_unlock(&web_mutex);
-
-       return ret;
-}
-
-int web_prof_disable(void)
-{
-       int ret = 0;
-
-       mutex_lock(&web_mutex);
-       if (!web_data->enable) {
-               pr_err("ERROR: Web profiling is already disabled\n");
-               ret = -EBUSY;
-               goto out;
-       }
-
-       __web_prof_disable(web_data);
-       if (web_data->pfg) {
-               put_pf_group(web_data->pfg);
-               web_data->pfg = NULL;
-       }
-       web_data->enable = false;
-
-out:
-       mutex_unlock(&web_mutex);
-       return ret;
-}
-
-static int webprobe_module_init(void)
-{
-       mutex_lock(&web_mutex);
-       web_data = kzalloc(sizeof(*web_data), GFP_KERNEL);
-       if (!web_data)
-               return -ENOMEM;
-
-       web_data->enable = false;
-       mutex_unlock(&web_mutex);
-
-       return 0;
-}
-
-static void webprobe_module_exit(void)
-{
-       mutex_lock(&web_mutex);
-       if (web_data->enable)
-               __web_prof_disable(web_data);
-
-       if (web_data->pfg) {
-               put_pf_group(web_data->pfg);
-               web_data->pfg = NULL;
-       }
-
-       kfree(web_data);
-       web_data = NULL;
-       mutex_unlock(&web_mutex);
-}
-
-SWAP_LIGHT_INIT_MODULE(NULL, webprobe_module_init, webprobe_module_exit,
-                      webprobe_debugfs_init, webprobe_debugfs_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("SWAP webprobe");
-MODULE_AUTHOR("Ruslan Soloviev <r.soloviev@samsung.com>"
-             "Anastasia Lyupa <a.lyupa@samsung.com>");
diff --git a/webprobe/webprobe.h b/webprobe/webprobe.h
deleted file mode 100644 (file)
index 003931e..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef _WEBPROBE_H
-#define _WEBPROBE_H
-
-/**
- * @file webprobe/webprobe_prof.h
- * @author Anastasia Lyupa <a.lyupa@samsung.com>
- *
- * @section LICENSE
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- *
- * @section COPYRIGHT
- * Copyright (C) Samsung Electronics, 2015
- *
- * @section DESCRIPTION
- * Profiling for webprobe
- */
-
-enum web_prof_addr_t {
-       INSPSERVER_START = 1,
-       TICK_PROBE
-};
-
-int web_prof_enable(void);
-int web_prof_disable(void);
-bool web_prof_enabled(void);
-u64 *web_prof_addr_ptr(enum web_prof_addr_t type);
-int web_prof_data_set(char *app_path, char *app_id);
-
-#endif /* _WEBPROBE_H */
diff --git a/webprobe/webprobe_debugfs.c b/webprobe/webprobe_debugfs.c
deleted file mode 100644 (file)
index e93dd95..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-/**
- *  webprobe/webprobe_debugfs.c
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- *
- * Copyright (C) Samsung Electronics, 2015
- *
- * 2015                 Anastasia Lyupa <a.lyupa@samsung.com>
- *
- */
-
-#include <linux/module.h>
-#include <linux/slab.h>
-#include <linux/debugfs.h>
-#include <linux/uaccess.h>
-
-#include <master/swap_debugfs.h>
-#include <master/swap_initializer.h>
-
-#include "webprobe_debugfs.h"
-#include "webprobe.h"
-
-static const char ENABLED_FILE[] =             "enabled";
-static const char APP_INFO_FILE[] =            "app_info";
-static const char INSPSERVER_START_FILE[] =    "inspector_server_start";
-static const char TICK_PROBE_FILE[] =          "tick_probe";
-
-enum { max_count = 256 };
-static char app_info[max_count];
-
-/* ============================================================================
- * ===              DEBUGFS FOR WEBPROBE INSTRUMENTATION                    ===
- * ============================================================================
- */
-
-static ssize_t read_enabled(struct file *file, char __user *user_buf,
-                           size_t count, loff_t *ppos)
-{
-       char buf[2];
-
-       buf[0] = web_prof_enabled() ? '1' : '0';
-       buf[1] = '\n';
-
-       return simple_read_from_buffer(user_buf, count, ppos, buf, 2);
-}
-
-static ssize_t write_enabled(struct file *file, const char __user *user_buf,
-                            size_t count, loff_t *ppos)
-{
-       int ret = 0;
-       char buf[32];
-       size_t buf_size;
-
-       buf_size = min(count, (sizeof(buf) - 1));
-       if (copy_from_user(buf, user_buf, buf_size))
-               return -EFAULT;
-
-       buf[buf_size] = '\0';
-       switch (buf[0]) {
-       case '1':
-               ret = web_prof_enable();
-               break;
-       case '0':
-               ret = web_prof_disable();
-               break;
-       default:
-               return -EINVAL;
-       }
-
-       if (ret)
-               return ret;
-
-       return count;
-}
-
-static const struct file_operations fops_enabled = {
-       .write =        write_enabled,
-       .read =         read_enabled,
-       .open =         swap_init_simple_open,
-       .release =      swap_init_simple_release,
-};
-
-static ssize_t write_app_info(struct file *file, const char __user *user_buf,
-                             size_t count, loff_t *ppos)
-{
-       int ret = 0;
-       char *buf, *path, *id;
-       int n;
-
-       if (count > max_count)
-               return -ENOMEM;
-
-       buf = kmalloc(count + 1, GFP_KERNEL);
-       if (!buf)
-               return -ENOMEM;
-
-       if (copy_from_user(buf, user_buf, count)) {
-               ret = -EFAULT;
-               goto free_buf;
-       }
-
-       buf[count] = '\0';
-
-       path = kmalloc(count, GFP_KERNEL);
-       if (!path) {
-               ret = -ENOMEM;
-               goto free_buf;
-       }
-
-       id = kmalloc(count, GFP_KERNEL);
-       if (!id) {
-               ret = -ENOMEM;
-               goto free_path;
-       }
-
-       n = sscanf(buf, "%s %s", path, id);
-
-       if (n != 2) {
-               ret = -EINVAL;
-               goto free_app_info;
-       }
-
-       web_prof_data_set(path, id);
-       snprintf(app_info, sizeof(app_info), "%s\n", buf);
-
-free_app_info:
-       kfree(id);
-free_path:
-       kfree(path);
-free_buf:
-       kfree(buf);
-
-       return ret ? ret : count;
-}
-
-static ssize_t read_app_info(struct file *file, char __user *userbuf,
-                            size_t count, loff_t *ppos)
-{
-       return simple_read_from_buffer(userbuf, count, ppos, app_info,
-                                      sizeof(app_info) - 1);
-}
-
-static const struct file_operations fops_app_info = {
-       .write =        write_app_info,
-       .read =         read_app_info,
-       .open =         swap_init_simple_open,
-       .release =      swap_init_simple_release,
-};
-
-/* ============================================================================
- * ===                             INIT/EXIT                                ===
- * ============================================================================
- */
-
-static struct dentry *webprobe_dir;
-
-void webprobe_debugfs_exit(void)
-{
-       debugfs_remove_recursive(webprobe_dir);
-       webprobe_dir = NULL;
-}
-
-int webprobe_debugfs_init(void)
-{
-       struct dentry *dentry;
-
-       dentry = swap_debugfs_getdir();
-       if (!dentry)
-               return -ENOENT;
-
-       webprobe_dir = swap_debugfs_create_dir("webprobe", dentry);
-       if (!webprobe_dir)
-               return -ENOMEM;
-
-       dentry = swap_debugfs_create_file(ENABLED_FILE, 0600, webprobe_dir,
-                                         NULL, &fops_enabled);
-
-       dentry = swap_debugfs_create_file(APP_INFO_FILE, 0600, webprobe_dir,
-                                         NULL, &fops_app_info);
-       if (!dentry)
-               goto fail;
-
-       dentry = swap_debugfs_create_x64(INSPSERVER_START_FILE, 0600,
-                                        webprobe_dir,
-                                        web_prof_addr_ptr(INSPSERVER_START));
-       if (!dentry)
-               goto fail;
-
-       dentry = swap_debugfs_create_x64(TICK_PROBE_FILE, 0600, webprobe_dir,
-                                        web_prof_addr_ptr(TICK_PROBE));
-       if (!dentry)
-               goto fail;
-
-       return 0;
-
-fail:
-       webprobe_debugfs_exit();
-       return -ENOMEM;
-}
diff --git a/webprobe/webprobe_debugfs.h b/webprobe/webprobe_debugfs.h
deleted file mode 100644 (file)
index e6a8544..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _WEBPROBE_DEBUGFS_H
-#define _WEBPROBE_DEBUGFS_H
-
-/**
- * @file webprobe/webprobe_debugfs.h
- * @author Anastasia Lyupa <a.lyupa@samsung.com>
- *
- * @section LICENSE
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- *
- * @section COPYRIGHT
- * Copyright (C) Samsung Electronics, 2015
- *
- * @section DESCRIPTION
- * Debugfs for webprobe
- */
-
-int webprobe_debugfs_init(void);
-void webprobe_debugfs_exit(void);
-
-#endif /* _WEBPROBE_DEBUGFS_H */