Update submodule name in logs 91/273691/3
authorUnsung Lee <unsung.lee@samsung.com>
Tue, 12 Apr 2022 09:08:59 +0000 (18:08 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Tue, 12 Apr 2022 09:12:05 +0000 (18:12 +0900)
Change-Id: I85875e3a30c45021d9b8337100a2881a1dc342f7
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
15 files changed:
src/common/cgroup/memory-cgroup.c
src/common/config-parser.c
src/common/module.c
src/common/util.c
src/process/proc-main.c
src/resource-limiter/memory/lowmem-dbus.c
src/resource-limiter/memory/lowmem-limit.c
src/resource-limiter/memory/vmpressure-lowmem-handler.c
src/resource-optimizer/cpu/cpu-sched.c
src/resource-optimizer/memory/compaction/compaction.c
src/resource-optimizer/memory/swap/fileswap.c
src/resource-optimizer/memory/swap/swap.c
src/resource-optimizer/memory/swap/zramswap.c
src/resource-optimizer/memory/swap/zswap.c
src/resourced/init.c

index 8d71f66..67984e1 100644 (file)
@@ -187,7 +187,7 @@ static void set_limit_in_bytes(const char *dir, unsigned int limit)
 
        error = cgroup_read_node_uint32(dir, MEMCG_LIMIT_BYTE, &prev);
        if (error) {
-               _E("[DEBUG] Failed to get %s from %s", MEMCG_LIMIT_BYTE, dir);
+               _E("[MEMORY-LIMIT] Failed to get %s from %s", MEMCG_LIMIT_BYTE, dir);
                return;
        }
 
@@ -212,19 +212,19 @@ int check_oom_and_set_limit(const char *dir, unsigned int limit)
        if (poo == -1) {
                error = fread_uint("/proc/sys/vm/panic_on_oom", &poo);
                if (error) {
-                       _E("[DEBUG] Failed to get %s from %s", "/proc/sys/vm/panic_on_oom", dir);
+                       _E("[MEMORY-LIMIT] Failed to get %s from %s", "/proc/sys/vm/panic_on_oom", dir);
                        return RESOURCED_ERROR_FAIL;
                }
        }
 
        /* If panic_on_oom is true (> 1), turn of panic_on_oom */
        if (poo != 0) {
-               _I("[DEBUG] %s's value is %d. That is, kernel panic will be inevitable on %s, when oom happens", "/proc/sys/vm/panic_on_oom", poo, dir);
+               _I("[MEMORY-LIMIT] %s's value is %d. That is, kernel panic will be inevitable on %s, when oom happens", "/proc/sys/vm/panic_on_oom", poo, dir);
                error = fwrite_uint("/proc/sys/vm/panic_on_oom", 0);
                if (!error)
                        fread_uint("/proc/sys/vm/panic_on_oom", &poo);
                else {
-                       _E("[DEBUG] Failed to update %s", "/proc/sys/vm/panic_on_oom");
+                       _E("[MEMORY-LIMIT] Failed to update %s", "/proc/sys/vm/panic_on_oom");
                        return RESOURCED_ERROR_FAIL;
                }
        }
@@ -272,7 +272,7 @@ static int memcg_write_optimizer_info(struct memcg_info *mi)
                ret = cgroup_write_node_uint32(name,
                        MEMCG_SWAPPINESS, swappiness);
                if (ret)
-                       _I("[DEBUG] failed to write %s %d to %s the",
+                       _I("[SWAP] failed to write %s %d to %s the",
                                MEMCG_SWAPPINESS, swappiness, name);
        }
 
index a011f52..d4d6555 100644 (file)
@@ -89,12 +89,12 @@ static int config_parse_time_us(const char *value)
        char size;
        char *ptr = strchr(value, 's');
        if (ptr == NULL) {
-               _E("[DEBUG] Cannot find 's' in the string (%s)", value);
+               _E("[CONFIG] Cannot find 's' in the string (%s)", value);
                return 0;
        }
 
        if (value > (ptr - 1)) {
-               _E("[DEBUG] Size of string should be larger than 1");
+               _E("[CONFIG] Size of string should be larger than 1");
                return 0;
        }
 
@@ -111,7 +111,7 @@ static int config_parse_time_us(const char *value)
                return atoi(value);
        }
        else {
-               _E("[DEBUG] Unknown unit of time");
+               _E("[CONFIG] Unknown unit of time");
                return 0;
        }
 }
@@ -123,25 +123,25 @@ static int optimizer_config(struct parse_result *result, void *user_data)
 
        struct swap_conf *swap_conf = get_swap_conf();
        if (swap_conf == NULL) {
-               _E("[DEBUG] swap configuration is NULL");
+               _E("[CONFIG] swap configuration is NULL");
                return RESOURCED_ERROR_FAIL;
        }
 
        struct dedup_conf *dedup_conf = get_dedup_conf();
        if (dedup_conf == NULL) {
-               _E("[DEBUG] dedup configuration is NULL");
+               _E("[CONFIG] dedup configuration is NULL");
                return RESOURCED_ERROR_FAIL;
        }
 
        struct compact_conf *compact_conf = get_compact_conf();
        if (compact_conf == NULL) {
-               _E("[DEBUG] compact configuration is NULL");
+               _E("[CONFIG] compact configuration is NULL");
                return RESOURCED_ERROR_FAIL;
        }
 
        struct cpu_sched_conf *cpu_sched_conf = get_cpu_sched_conf();
        if (cpu_sched_conf == NULL) {
-               _E("[DEBUG] cpu_sched configuration is NULL");
+               _E("[CONFIG] cpu_sched configuration is NULL");
                return RESOURCED_ERROR_FAIL;
        }
 
@@ -155,7 +155,7 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                                !strncmp(result->value, "0", 2))
                                swap_conf->enable = false;
                        else {
-                               _E("[DEBUG] Unknown value for %s", result->name);
+                               _E("[CONFIG] Unknown value for %s", result->name);
                                return RESOURCED_ERROR_FAIL;
                        }
                }
@@ -169,14 +169,14 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                                !strncmp(result->value, "0", 2))
                                swap_conf->boot_reclaim_enable = false;
                        else {
-                               _E("[DEBUG] Unknown value for %s", result->name);
+                               _E("[CONFIG] Unknown value for %s", result->name);
                                return RESOURCED_ERROR_FAIL;
                        }
                }
                else if (!strncmp(result->name, SWAP_TYPE_CONF,
                                        strlen(SWAP_TYPE_CONF)+1)) {
                        if (config_parse_swap_types(result->value, &swap_conf->swap_type) < 0) {
-                               _E("[DEBUG] Failed to parse type of swap, so use default zram type");
+                               _E("[CONFIG] Failed to parse type of swap, so use default zram type");
                                swap_conf->swap_type = SWAP_TYPE_ZRAM;
                        }
 /*                     if (strlen(result->value) + 1 > sizeof(swap_conf->type)) {
@@ -202,7 +202,7 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                        swap_conf->swappiness[CGROUP_LOW] = atoi(result->value);
                }
                else {
-                       _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                       _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                        result->name, result->value, result->section);
                }
        }
@@ -219,7 +219,7 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                        swap_conf->zram.ratio = atof(result->value);
                }
                else {
-                       _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                       _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                        result->name, result->value, result->section);
                }
        }
@@ -236,7 +236,7 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                                        sizeof(swap_conf->zswap.pool_type) - 1);
                }
                else {
-                       _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                       _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                        result->name, result->value, result->section);
                }
        }
@@ -250,7 +250,7 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                                !strncmp(result->value, "0", 2))
                                dedup_conf->enable = false;
                        else {
-                               _E("[DEBUG] Unknown value for %s", result->name);
+                               _E("[CONFIG] Unknown value for %s", result->name);
                                return RESOURCED_ERROR_FAIL;
                        }
                }
@@ -263,7 +263,7 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                                !strncmp(result->value, "0", 2))
                                dedup_conf->boot_dedup_enable = false;
                        else {
-                               _E("[DEBUG] Unknown value for %s", result->name);
+                               _E("[CONFIG] Unknown value for %s", result->name);
                                return RESOURCED_ERROR_FAIL;
                        }
                }
@@ -278,12 +278,12 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                                !strncmp(result->value, "false", 6))
                                dedup_conf->scan_on_lowmem = false;
                        else {
-                               _E("[DEBUG] Unknown value for %s", result->name);
+                               _E("[CONFIG] Unknown value for %s", result->name);
                                return RESOURCED_ERROR_FAIL;
                        }
                }
                else {
-                       _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                       _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                        result->name, result->value, result->section);
                }
        }
@@ -304,7 +304,7 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                        dedup_conf->ksm.boost_pages = atoi(result->value);
                }
                else {
-                       _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                       _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                        result->name, result->value, result->section);
                }
        }
@@ -320,7 +320,7 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                                !strncmp(result->value, "false", 6))
                                compact_conf->enable = false;
                        else {
-                               _E("[DEBUG] Unknown value for %s", result->name);
+                               _E("[CONFIG] Unknown value for %s", result->name);
                                return RESOURCED_ERROR_FAIL;
                        }
                }
@@ -328,7 +328,7 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                        compact_conf->frag_level = atoi(result->value);
                }
                else {
-                       _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                       _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                        result->name, result->value, result->section);
                }
        }
@@ -347,7 +347,7 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                        cpu_sched_conf->rt_period_us = config_parse_time_us(result->value);
                }
                else {
-                       _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                       _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                        result->name, result->value, result->section);
                }
        }
@@ -360,14 +360,14 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                        error = set_cpucg_conf(result->name, result->value);
                }
                else {
-                       _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                       _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                        result->name, result->value, result->section);
                }
 
                return error;
        }
        else {
-               _E("[DEBUG] Unknown section name (%s) and value (%s) on section (%s)",
+               _E("[CONFIG] Unknown section name (%s) and value (%s) on section (%s)",
                                result->name, result->value, result->section);
        }
 
@@ -382,7 +382,7 @@ static int limiter_config(struct parse_result *result, void *user_data)
 
        struct memcg_conf *memcg_conf = get_memcg_conf();
        if (memcg_conf == NULL) {
-               _E("[DEBUG] memory cgroup configuration is NULL");
+               _E("[CONFIG] memory cgroup configuration is NULL");
                return RESOURCED_ERROR_FAIL;
        }
 
@@ -390,7 +390,7 @@ static int limiter_config(struct parse_result *result, void *user_data)
                                strlen(MEMORY_GROUP_LIMIT_SECTION)+1)) {
                char *ptr = strchr(result->value, '%');
                if (ptr == NULL) {
-                       _E("[DEBUG] Cannot find '%%' in the string (%s)", result->value);
+                       _E("[CONFIG] Cannot find '%%' in the string (%s)", result->value);
                        return RESOURCED_ERROR_FAIL;
                }
                else
@@ -413,7 +413,7 @@ static int limiter_config(struct parse_result *result, void *user_data)
                        memcg_conf->cgroup_limit[CGROUP_LOW] = atof(result->value);
                }
                else {
-                       _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                       _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                        result->name, result->value, result->section);
                }
        }
@@ -430,7 +430,7 @@ static int limiter_config(struct parse_result *result, void *user_data)
                                !strncmp(result->value, "0", 2))
                                memcg_conf->oom_popup = false;
                        else {
-                               _E("[DEBUG] Unknown value for %s", result->name);
+                               _E("[CONFIG] Unknown value for %s", result->name);
                                return RESOURCED_ERROR_FAIL;
                        }
                }
@@ -442,12 +442,12 @@ static int limiter_config(struct parse_result *result, void *user_data)
                        if (ptr == NULL) {
                                ptr = strchr(result->value, 'B');
                                if (ptr == NULL) {
-                                       _E("[DEBUG] Cannot find 'B' in the string (%s)", result->value);
+                                       _E("[CONFIG] Cannot find 'B' in the string (%s)", result->value);
                                        return RESOURCED_ERROR_FAIL;
                                }
 
                                if (result->value > (ptr - 1)) {
-                                       _E("[DEBUG] Size of string should be larger than 1");
+                                       _E("[CONFIG] Size of string should be larger than 1");
                                        return RESOURCED_ERROR_FAIL;
                                }
 
@@ -478,10 +478,10 @@ static int limiter_config(struct parse_result *result, void *user_data)
                        }
 
                        else {
-                               _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                               _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                                result->name, result->value, result->section);
                        }
-                       
+
                        return error;
                }
        }
@@ -502,7 +502,7 @@ static int limiter_config(struct parse_result *result, void *user_data)
                        error = set_mem_action_conf(&memcg_conf->guiapp, result->value);
                }
                else {
-                       _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                       _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                        result->name, result->value, result->section);
                }
 
@@ -517,14 +517,14 @@ static int limiter_config(struct parse_result *result, void *user_data)
                        error = set_mem_action_conf(&memcg_conf->background, result->value);
                }
                else {
-                       _E("[DEBUG] Unknown configuration name (%s) and value (%s) on section (%s)",
+                       _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
                                        result->name, result->value, result->section);
                }
 
                return error;
        }
        else {
-               _E("[DEBUG] Unknown section name (%s) and value (%s) on section (%s)",
+               _E("[CONFIG] Unknown section name (%s) and value (%s) on section (%s)",
                                result->name, result->value, result->section);
        }
 
index e0cdaa3..4fb2d6d 100644 (file)
@@ -107,7 +107,7 @@ static void module_initcall_level(void *data, int priority)
                /* Module disabled on runtime or just failed to start. */
                if (ret < 0) {
                        module->initalized = MODULE_DROPPED;
-                       _E("[DEBUG] Fail to initialize [%s] module, dropped.", module->name);
+                       _E("Fail to initialize [%s] module, dropped.", module->name);
                        continue;
                }
 
index 48af630..14963d0 100644 (file)
@@ -54,7 +54,7 @@ int sched_setattr(pid_t pid, struct sched_attr *attr, unsigned int flags)
 {
        int error;
 
-       _I("[DEBUG] policy = %s", attr->sched_policy == SCHED_IDLE ? "SCHED_IDLE" :
+       _I("[CPU-SCHED] policy = %s", attr->sched_policy == SCHED_IDLE ? "SCHED_IDLE" :
                                          attr->sched_policy == SCHED_BATCH ? "SCHED_BATCH" :
                                                                  attr->sched_policy == SCHED_OTHER ? "SCHED_OTHER" :
                                                                  attr->sched_policy == SCHED_FIFO ? "SCHED_FIFO" :
@@ -64,19 +64,19 @@ int sched_setattr(pid_t pid, struct sched_attr *attr, unsigned int flags)
        switch (attr->sched_policy) {
                case SCHED_IDLE:
                        if (attr->sched_priority != 0) {
-                               _E("[DEBUG] priority of SCHED_IDLE should be 0");
+                               _E("[CPU-SCHED] priority of SCHED_IDLE should be 0");
                                return RESOURCED_ERROR_FAIL;
                        }
                        break;
                case SCHED_BATCH:
                case SCHED_OTHER:
                        if (attr->sched_priority != 0) {
-                               _E("[DEBUG] priority of %s should be 0", attr->sched_policy == SCHED_BATCH ? "SCHED_BATCH" : "SCHED_OTHER");
+                               _E("[CPU-SCHED] priority of %s should be 0", attr->sched_policy == SCHED_BATCH ? "SCHED_BATCH" : "SCHED_OTHER");
                                return RESOURCED_ERROR_FAIL;
                        }
 
                        if (attr->sched_nice == CPU_INIT_NICE) {
-                               _W("[DEBUG] nice value should be located between %d and %d",
+                               _W("[CPU-SCHED] nice value should be located between %d and %d",
                                                CPU_MIN_NICE, CPU_MAX_NICE);
                                return RESOURCED_ERROR_FAIL;
                        }
@@ -88,17 +88,17 @@ int sched_setattr(pid_t pid, struct sched_attr *attr, unsigned int flags)
                case SCHED_FIFO:
                case SCHED_RR:
                        if (attr->sched_priority == CPU_INIT_PRIO) {
-                               _E("[DEBUG] priority of %s should be located between %d and %d",
+                               _E("[CPU-SCHED] priority of %s should be located between %d and %d",
                                                attr->sched_policy == SCHED_FIFO ? "SCHED_FIFO" : "SCHED_RR",
                                                CPU_MIN_PRIO, CPU_MAX_PRIO);
                                return RESOURCED_ERROR_FAIL;
                        }
                        break;
                case SCHED_DEADLINE:
-                       _W("[DEBUG] we do not support deadline scheulder yet");
+                       _W("[CPU-SCHED] we do not support deadline scheulder yet");
                        return RESOURCED_ERROR_NONE;
                default:
-                       _E("[DEBUG] Unknown sched type (%d)", attr->sched_policy);
+                       _E("[CPU-SCHED] Unknown sched type (%d)", attr->sched_policy);
                        return RESOURCED_ERROR_FAIL;
        }
 
@@ -111,7 +111,7 @@ int sched_setattr(pid_t pid, struct sched_attr *attr, unsigned int flags)
        }
 #endif
        if (error) {
-               _E("[DEBUG] Failed to set policy and priority");
+               _E("[CPU-SCHED] Failed to set policy and priority");
                return RESOURCED_ERROR_FAIL;
        }
 
index 95d286a..49b6868 100644 (file)
@@ -377,13 +377,13 @@ EXPORT_TEST void proc_app_info_add_child_pid(struct proc_app_info *pai, pid_t pi
 
        runtime_app_info_path = proc_get_runtime_app_info_path(pai);
        if (!runtime_app_info_path) {
-               _E("Failed to get runtime appinfo path: not enough memory");
+               _E("[PROCESS] Failed to get runtime appinfo path: not enough memory");
                return;
        }
 
        ret = proc_runtime_app_info_write_procs(runtime_app_info_path, pai->childs);
        if (ret < 0)
-               _E("Failed to write appinfo children '%s': %m", runtime_app_info_path);
+               _E("[PROCESS] Failed to write appinfo children '%s': %m", runtime_app_info_path);
 }
 
 void proc_set_process_memory_state(struct proc_app_info *pai,
@@ -466,7 +466,7 @@ resourced_ret_c proc_set_runtime_exclude_list(const int pid, int type, struct pr
        int ret;
 
        if (!pai) {
-               _E("process app info is NULL");
+               _E("[PROCESS] process app info is NULL");
                return RESOURCED_ERROR_NO_DATA;
        }
 
@@ -483,7 +483,7 @@ resourced_ret_c proc_set_runtime_exclude_list(const int pid, int type, struct pr
        } else {
                pai->runtime_exclude = type;
        }
-       _D("pid %d set proc exclude list, type = %d, exclude = %d",
+       _D("[PROCESS] pid %d set proc exclude list, type = %d, exclude = %d",
                    pid, type, pai->runtime_exclude);
 
        runtime_app_info_path = proc_get_runtime_app_info_path(pai);
@@ -531,10 +531,10 @@ static struct proc_program_info *proc_add_program_list(const int type,
 
        ppi = find_program_info(pkgname);
        if (!ppi) {
-               _D("Can't find %s in the program list. Start to add it", pkgname);
+               _D("[PROCESS] Can't find %s in the program list. Start to add it", pkgname);
                ppi = calloc(sizeof(struct proc_program_info), 1);
                if (!ppi) {
-                       _E("Fail to add %s : not enough memory", pkgname);
+                       _E("[PROCESS] Fail to add %s : not enough memory", pkgname);
                        return NULL;
                }
 
@@ -544,12 +544,12 @@ static struct proc_program_info *proc_add_program_list(const int type,
                        ppi->pkgname = strndup(pkgname, strlen(pkgname)+1);
 
                if (!ppi->pkgname) {
-                       _E("Fail to add %s : not enough memory", pkgname);
+                       _E("[PROCESS] Fail to add %s : not enough memory", pkgname);
                        free(ppi);
                        return NULL;
                }
                proc_program_list = g_slist_prepend(proc_program_list, ppi);
-               _I("%s is added in the program info", pkgname);
+               _I("[PROCESS] %s is added in the program info", pkgname);
        }
        if (is_ui_app(type))
                ppi->app_list = g_slist_prepend(ppi->app_list, pai);
@@ -700,7 +700,7 @@ __attribute__((weak)) void proc_app_list_add_app_info(struct proc_app_info *pai)
 
        ret = proc_runtime_write_app_info(pai);
        if (ret < 0)
-               _E("Failed to add runtime app info: %m");
+               _E("[PROCESS] Failed to add runtime app info: %m");
 
        proc_app_list = proc_app_list_open();
        app_list.list = g_slist_prepend(proc_app_list, pai);
@@ -714,7 +714,7 @@ EXPORT_TEST GSList *proc_app_list_remove_app_info(struct proc_app_info *pai)
 
        ret = proc_runtime_remove_app_info(pai);
        if (ret < 0)
-               _E("Failed to remove appinfo '%s': %m", pai->appid);
+               _E("[PROCESS] Failed to remove appinfo '%s': %m", pai->appid);
 
        proc_app_list = proc_app_list_open();
        app_list.list = g_slist_remove(proc_app_list, pai);
@@ -735,7 +735,7 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
        int ret;
 
        if (!appid || !pkgid) {
-               _E("Each app should have appid and pkgid");
+               _E("[PROCESS] Each app should have appid and pkgid");
                return NULL;
        }
 
@@ -753,7 +753,7 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
                        prelaunch = NULL;
 
                        if (!streq(pai->appid, appid)) {
-                               _E("prelaunched app(%s) is not matched with new app info(%s)",
+                               _E("[PROCESS] prelaunched app(%s) is not matched with new app info(%s)",
                                        pai->appid, appid);
                                proc_remove_app_info(pai);
 
@@ -765,12 +765,12 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
                        pai = calloc(sizeof(struct proc_app_info), 1);
                        if (!pai)
                                return NULL;
-                       _I("app_info(%s) will be added without prelaunch", appid);
+                       _I("[PROCESS] app_info(%s) will be added without prelaunch", appid);
                }
        } else {
                /* prelaunch */
                if (prelaunch) {
-                       _E("prelaunched app was not gone to launch state, appid(%s)", prelaunch->appid);
+                       _E("[PROCESS] prelaunched app was not gone to launch state, appid(%s)", prelaunch->appid);
                        proc_remove_app_info(prelaunch);
                        prelaunch = NULL;
                }
@@ -785,7 +785,7 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
        if (!pai->ai) {
                pai->ai = resourced_appinfo_get(pai->ai, appid, pkgid);
                if (!pai->ai) {
-                       _E("Failed to get resourced_appinfo, appid(%s), pkgid(%s)", appid, pkgid);
+                       _E("[PROCESS] Failed to get resourced_appinfo, appid(%s), pkgid(%s)", appid, pkgid);
                        free(pai);
                        return NULL;
                }
@@ -806,7 +806,7 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
                if (!pai->starttime) {
                        ret = proc_get_uptime(&uptime);
                        if (ret)
-                               _E("Failed to get uptime");
+                               _E("[PROCESS] Failed to get uptime");
                        else
                                pai->starttime = uptime;
                }
@@ -859,10 +859,10 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
                                                sched_setattr(pid, &attr, 0);
                                                error = sched_getattr(pid, &attr, 0);
                                                if (error)
-                                                       _E("[DEBUG] Failed to get sched attributes");
+                                                       _E("[PROCESS] Failed to get sched attributes");
 
                                                if (attr.sched_policy != SCHED_OTHER)
-                                                       _E("[DEBUG] current policy (%d) is different from %d",
+                                                       _E("[PROCESS] current policy (%d) is different from %d",
                                                                        attr.sched_policy, SCHED_OTHER);
                                                break;
                                        case CPU_SCHED_IDLE:
@@ -870,10 +870,10 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
                                                sched_setattr(pid, &attr, 0);
                                                error = sched_getattr(pid, &attr, 0);
                                                if (error)
-                                                       _E("[DEBUG] Failed to get sched attributes");
+                                                       _E("[PROCESS] Failed to get sched attributes");
 
                                                if (attr.sched_policy != SCHED_IDLE)
-                                                       _E("[DEBUG] current policy (%d) is different from %d",
+                                                       _E("[PROCESS] current policy (%d) is different from %d",
                                                                        attr.sched_policy, SCHED_IDLE);
                                                break;
                                        case CPU_SCHED_BATCH:
@@ -881,10 +881,10 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
                                                sched_setattr(pid, &attr, 0);
                                                error = sched_getattr(pid, &attr, 0);
                                                if (error)
-                                                       _E("[DEBUG] Failed to get sched attributes");
+                                                       _E("[PROCESS] Failed to get sched attributes");
 
                                                if (attr.sched_policy != SCHED_BATCH)
-                                                       _E("[DEBUG] current policy (%d) is different from %d",
+                                                       _E("[PROCESS] current policy (%d) is different from %d",
                                                                        attr.sched_policy, SCHED_BATCH);
                                                break;
                                        case CPU_SCHED_FIFO:
@@ -892,10 +892,10 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
                                                sched_setattr(pid, &attr, 0);
                                                error = sched_getattr(pid, &attr, 0);
                                                if (error)
-                                                       _E("[DEBUG] Failed to get sched attributes");
+                                                       _E("[PROCESS] Failed to get sched attributes");
 
                                                if (attr.sched_policy != SCHED_FIFO)
-                                                       _E("[DEBUG] current policy (%d) is different from %d",
+                                                       _E("[PROCESS] current policy (%d) is different from %d",
                                                                        attr.sched_policy, SCHED_FIFO);
                                                break;
                                        case CPU_SCHED_RR:
@@ -903,10 +903,10 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
                                                sched_setattr(pid, &attr, 0);
                                                error = sched_getattr(pid, &attr, 0);
                                                if (error)
-                                                       _E("[DEBUG] Failed to get sched attributes");
+                                                       _E("[PROCESS] Failed to get sched attributes");
 
                                                if (attr.sched_policy != SCHED_RR)
-                                                       _E("[DEBUG] current policy (%d) is different from %d",
+                                                       _E("[PROCESS] current policy (%d) is different from %d",
                                                                        attr.sched_policy, SCHED_RR);
                                                break;
                                        case CPU_SCHED_DEADLINE:
@@ -914,20 +914,20 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
                                                sched_setattr(pid, &attr, 0);
                                                error = sched_getattr(pid, &attr, 0);
                                                if (error)
-                                                       _E("[DEBUG] Failed to get sched attributes");
+                                                       _E("[PROCESS] Failed to get sched attributes");
                                                break;
                                        default:
-                                               _E("[DEBUG] Unknown CPU sched type");
+                                               _E("[PROCESS] Unknown CPU sched type");
                                }
 
-                               _I("[DEBUG] policy = %s", attr.sched_policy == SCHED_IDLE ? "SCHED_IDLE" :
+                               _I("[PROCESS] policy = %s", attr.sched_policy == SCHED_IDLE ? "SCHED_IDLE" :
                                                                                  attr.sched_policy == SCHED_BATCH ? "SCHED_BATCH" :
                                                                                  attr.sched_policy == SCHED_OTHER ? "SCHED_OTHER" :
                                                                                  attr.sched_policy == SCHED_FIFO ? "SCHED_FIFO" :
                                                                                  attr.sched_policy == SCHED_RR ? "SCHED_RR" :
                                                                                  attr.sched_policy == SCHED_DEADLINE ? "SCHED_DEADLINE" : "UNKNOWN");
-                               _I("[DEBUG] nice = %d", attr.sched_nice);
-                               _I("[DEBUG] priority = %d", attr.sched_priority);
+                               _I("[PROCESS] nice = %d", attr.sched_nice);
+                               _I("[PROCESS] priority = %d", attr.sched_priority);
 
                                if (pci->watchdog_action == PROC_ACTION_IGNORE)
                                        pai->app_watchdog_exclude = true;
@@ -994,7 +994,7 @@ EXPORT_TEST void proc_app_info_remove_child_pid(struct proc_app_info *pai, pid_t
 
        runtime_app_info_path = proc_get_runtime_app_info_path(pai);
        if (!runtime_app_info_path) {
-               _E("Failed to get runtime appinfo path: not enough memory");
+               _E("[PROCESS] Failed to get runtime appinfo path: not enough memory");
                return;
        }
 
@@ -1010,7 +1010,7 @@ EXPORT_TEST void proc_app_info_remove_child_pid(struct proc_app_info *pai, pid_t
 
        ret = proc_runtime_app_info_write_procs(runtime_app_info_path, pai->childs);
        if (ret < 0)
-               _E("Failed to write appinfo children '%s': %m", runtime_app_info_path);
+               _E("[PROCESS] Failed to write appinfo children '%s': %m", runtime_app_info_path);
 
        return;
 
@@ -1020,7 +1020,7 @@ remove_all:
 
        ret = proc_runtime_app_info_remove_procs(runtime_app_info_path);
        if (ret < 0)
-               _E("Failed to remove appinfo children '%s': %m", runtime_app_info_path);
+               _E("[PROCESS] Failed to remove appinfo children '%s': %m", runtime_app_info_path);
 
        return;
 }
@@ -1205,7 +1205,7 @@ static void proc_module_init(void *data)
                if (module->init)
                        ret = module->init(data);
                if (ret != RESOURCED_ERROR_NONE)
-                       _E("Fail to initialize [%s] module\n", module->name);
+                       _E("[PROCESS] Fail to initialize [%s] module\n", module->name);
        }
 }
 
@@ -1217,11 +1217,11 @@ static void proc_module_exit(void *data)
 
        gslist_for_each_item(iter, proc_module) {
                module = (struct proc_module_ops *)iter->data;
-               _D("Deinitialize [%s] module\n", module->name);
+               _D("[PROCESS] Deinitialize [%s] module\n", module->name);
                if (module->exit)
                        ret = module->exit(data);
                if (ret != RESOURCED_ERROR_NONE)
-                       _E("Fail to deinitialize [%s] module\n", module->name);
+                       _E("[PROCESS] Fail to deinitialize [%s] module\n", module->name);
        }
 }
 
@@ -1264,7 +1264,7 @@ static int proc_restore_runtime_app_info(const char *path)
 
        ret = proc_get_oom_score_adj(main_pid, &oom_score_adj);
        if (ret < 0) {
-               _I("pid %d is already terminated.", main_pid);
+               _I("[PROCESS] pid %d is already terminated.", main_pid);
                return ret;
        }
 
@@ -1297,7 +1297,7 @@ static int proc_restore_runtime_app_info(const char *path)
 
        (void) proc_app_list_add_app_info(pai);
 
-       _I("runtime appinfo restored: %s, %s", appid, pkgname);
+       _I("[PROCESS] runtime appinfo restored: %s, %s", appid, pkgname);
 
        return 0;
 }
@@ -1323,13 +1323,13 @@ static void proc_restore_runtime_app_list(void)
 
                ret = asprintf(&path, RUNTIME_APP_INFO_DIR "/%s", dir->d_name);
                if (ret < 0) {
-                       _E("Failed to allocate memory");
+                       _E("[PROCESS] Failed to allocate memory");
                        return;
                }
 
                ret = proc_restore_runtime_app_info(path);
                if (ret < 0)
-                       _E("Failed to restore runtime appinfo '%s': %m", dir->d_name);
+                       _E("[PROCESS] Failed to restore runtime appinfo '%s': %m", dir->d_name);
        }
 }
 
@@ -1337,7 +1337,7 @@ static int resourced_proc_init(void* data)
 {
        int ret = mkdir(RUNTIME_APP_INFO_DIR, S_IRWXU | S_IRGRP | S_IXGRP);
        if (ret < 0 && errno != EEXIST) {
-               _E("Failed to create directory %s: %m", RUNTIME_APP_INFO_DIR);
+               _E("[PROCESS] Failed to create directory %s: %m", RUNTIME_APP_INFO_DIR);
                return RESOURCED_ERROR_FAIL;
        }
 
@@ -1383,10 +1383,10 @@ int proc_get_appflag(const pid_t pid)
                find_app_info(pid);
 
        if (pai) {
-               _D("get apptype = %d", pai->flags);
+               _D("[PROCESS] get apptype = %d", pai->flags);
                return pai->flags;
        } else
-               _D("there is no process info for pid = %d", pid);
+               _D("[PROCESS] there is no process info for pid = %d", pid);
        return PROC_NONE;
 }
 
@@ -1409,7 +1409,7 @@ void proc_set_group(pid_t ownerpid, pid_t childpid, char *pkgname)
         */
        ret = proc_get_oom_score_adj(ownerpid, &owner_oom);
        if (ret < 0  || owner_oom == OOMADJ_BACKGRD_PERCEPTIBLE) {
-               _D("owner pid(%d) was already terminated", ownerpid);
+               _D("[PROCESS] owner pid(%d) was already terminated", ownerpid);
                return;
        }
 
@@ -1435,7 +1435,7 @@ void proc_set_group(pid_t ownerpid, pid_t childpid, char *pkgname)
                if (pai->main_pid == childpid) {
                        ret = proc_get_oom_score_adj(childpid, &child_oom);
                        if (ret < 0) {
-                               _D("can't get oom score for pid (%d)", childpid);
+                               _D("[PROCESS] can't get oom score for pid (%d)", childpid);
                                child_oom = 0;
                        }
                        child_type = pai->type;
@@ -1450,7 +1450,7 @@ void proc_set_group(pid_t ownerpid, pid_t childpid, char *pkgname)
                                owner->runtime_exclude += pai->runtime_exclude;
                        proc_remove_app_info(pai);
                } else {
-                       _D("main pid(%d) was different from childpid(%d)",
+                       _D("[PROCESS] main pid(%d) was different from childpid(%d)",
                            pai->main_pid, childpid);
                        proc_app_info_remove_child_pid(pai, childpid);
                }
@@ -1556,12 +1556,12 @@ int resourced_proc_status_change(int status, pid_t pid, char *app_name, char *pk
        if (status != PROC_CGROUP_SET_TERMINATED &&
            status != PROC_CGROUP_SET_NOTI_REQUEST) {
                if (!pid) {
-                       _E("invalid pid : %d of %s", pid, app_name ? app_name : "noprocess");
+                       _E("[PROCESS] invalid pid : %d of %s", pid, app_name ? app_name : "noprocess");
                        return RESOURCED_ERROR_FAIL;
                }
                ret = proc_get_oom_score_adj(pid, &oom_score_adj);
                if (ret < 0) {
-                       _E("Empty pid or process not exists. %d", pid);
+                       _E("[PROCESS] Empty pid or process not exists. %d", pid);
                        return RESOURCED_ERROR_FAIL;
                }
        }
@@ -1572,9 +1572,9 @@ int resourced_proc_status_change(int status, pid_t pid, char *app_name, char *pk
        switch (status) {
        case PROC_CGROUP_SET_FOREGRD:
                if (app_name)
-                       _SD("set foreground: app %s, pid %d", app_name, pid);
+                       _SD("[PROCESS] set foreground: app %s, pid %d", app_name, pid);
                else
-                       _SD("set foreground: pid %d", pid);
+                       _SD("[PROCESS] set foreground: pid %d", pid);
 
                ps.pai = find_app_info(pid);
                if (ps.pai)
@@ -1600,21 +1600,19 @@ int resourced_proc_status_change(int status, pid_t pid, char *app_name, char *pk
                break;
        case PROC_CGROUP_SET_LAUNCH_REQUEST:
                if (!app_name) {
-                       _E("launch request: need app name! pid %d", pid);
+                       _E("[PROCESS] launch request: need app name! pid %d", pid);
                        return RESOURCED_ERROR_NO_DATA;
                }
 
                if (pkg_name)
-                       _SD("launch request: app %s, pkg %s, pid %d", app_name, pkg_name, pid);
+                       _SD("[PROCESS] launch request: app %s, pkg %s, pid %d", app_name, pkg_name, pid);
                else
-                       _SD("launch request: app %s, pid %d", app_name, pid);
+                       _SD("[PROCESS] launch request: app %s, pid %d", app_name, pid);
 
                ps.pai = proc_add_app_info(app_name, pkg_name, pid, 0, 0, apptype, PROC_STATE_FOREGROUND);
                if (!ps.pai)
                        break;
 
-//             proc_priority_set_fixed(&ps);
-
                if (apptype == PROC_TYPE_WIDGET &&
                                !CHECK_BIT(ps.pai->flags, PROC_CGROUP_HIGH_ATTRIBUTE))
                        proc_set_oom_score_adj(pid, OOMADJ_BACKGRD_LOCKED, ps.pai);
@@ -1634,19 +1632,18 @@ int resourced_proc_status_change(int status, pid_t pid, char *app_name, char *pk
                break;
        case PROC_CGROUP_SET_SERVICE_REQUEST:
                if (!app_name) {
-                       _E("service launch request: need app name! pid = %d", pid);
+                       _E("[PROCESS] service launch request: need app name! pid = %d", pid);
                        return RESOURCED_ERROR_NO_DATA;
                }
                if (pkg_name)
-                       _SD("service launch request: app %s, pkg %s, pid %d", app_name, pkg_name, pid);
+                       _SD("[PROCESS] service launch request: app %s, pkg %s, pid %d", app_name, pkg_name, pid);
                else
-                       _SD("service launch request: app %s, pid %d", app_name, pid);
+                       _SD("[PROCESS] service launch request: app %s, pid %d", app_name, pid);
 
                ps.pai = proc_add_app_info(app_name, pkg_name, pid, 0, 0, apptype, PROC_STATE_FOREGROUND);
                if (!ps.pai)
                        break;
 
-//             proc_priority_set_fixed(&ps);
                proc_set_default_svc_oomscore(ps.pai->program, ps.pai);
 
                resourced_notify(RESOURCED_NOTIFIER_SERVICE_LAUNCH, &ps);
@@ -1657,10 +1654,10 @@ int resourced_proc_status_change(int status, pid_t pid, char *app_name, char *pk
        case PROC_CGROUP_SET_RESUME_REQUEST:
                /* init oom_score_value */
                if (!app_name) {
-                       _E("resume request: need app name! pid = %d", pid);
+                       _E("[PROCESS] resume request: need app name! pid = %d", pid);
                        return RESOURCED_ERROR_NO_DATA;
                }
-               _SD("resume request: app %s, pid %d", app_name, pid);
+               _SD("[PROCESS] resume request: app %s, pid %d", app_name, pid);
 
                ps.pai = find_app_info(pid);
                if (!ps.pai)
@@ -1683,9 +1680,9 @@ int resourced_proc_status_change(int status, pid_t pid, char *app_name, char *pk
                break;
        case PROC_CGROUP_SET_TERMINATE_REQUEST:
                if (app_name)
-                       _SD("terminate request: app %s, pid %d", app_name, pid);
+                       _SD("[PROCESS] terminate request: app %s, pid %d", app_name, pid);
                else
-                       _SD("terminate request: pid %d", pid);
+                       _SD("[PROCESS] terminate request: pid %d", pid);
 
                ps.pai = find_app_info(pid);
                ps.pid = pid;
@@ -1701,9 +1698,9 @@ int resourced_proc_status_change(int status, pid_t pid, char *app_name, char *pk
                break;
        case PROC_CGROUP_SET_BACKGRD:
                if (app_name)
-                       _SD("set background: app %s, pid %d", app_name, pid);
+                       _SD("[PROCESS] set background: app %s, pid %d", app_name, pid);
                else
-                       _SD("set background: pid %d", pid);
+                       _SD("[PROCESS] set background: pid %d", pid);
 
                if (apptype == PROC_TYPE_WIDGET  || apptype == PROC_TYPE_WATCH) {
                        ps.pai = find_app_info(pid);
@@ -1746,7 +1743,7 @@ int resourced_proc_status_change(int status, pid_t pid, char *app_name, char *pk
                        break;
                ps.pai = find_app_info_by_appid(app_name);
                if (!ps.pai) {
-                       _E("set noti request: no entry for %s in app list!", app_name);
+                       _E("[PROCESS] set noti request: no entry for %s in app list!", app_name);
                        break;
                }
                ps.pid = ps.pai->main_pid;
@@ -1780,14 +1777,14 @@ int resourced_proc_action(int status, int argnum, char **arg)
        pid_t pid;
        char *pidbuf = NULL, *cgroup_name = NULL, *pkg_name = NULL;
        if (argnum < 1) {
-               _E("Unsupported number of arguments!");
+               _E("[PROCESS] Unsupported number of arguments!");
                return RESOURCED_ERROR_INVALID_PARAMETER;
        }
 
        pidbuf = arg[0];
        pid = (pid_t)atoi(pidbuf);
        if (pid < 0) {
-               _E("Invalid pid argument!");
+               _E("[PROCESS] Invalid pid argument!");
                return RESOURCED_ERROR_INVALID_PARAMETER;
        }
 
@@ -1797,7 +1794,7 @@ int resourced_proc_action(int status, int argnum, char **arg)
                cgroup_name = arg[1];
        if (argnum == 3)
                pkg_name = arg[2];
-       _SD("appid %s, pid %d, status %d\n", cgroup_name, pid, status);
+       _SD("[PROCESS] appid %s, pid %d, status %d\n", cgroup_name, pid, status);
        return resourced_proc_status_change(status, pid, cgroup_name, pkg_name, PROC_TYPE_GUI);
 }
 
@@ -1824,7 +1821,7 @@ int proc_get_state(int type, pid_t pid, char *buf, int len)
                ret = proc_get_oom_score_adj(pid, (int *)buf);
                break;
        default:
-               _E("unsupported command %d, pid(%d)", type, pid);
+               _E("[PROCESS] unsupported command %d, pid(%d)", type, pid);
                ret = RESOURCED_ERROR_FAIL;
                break;
        }
@@ -1844,7 +1841,7 @@ void resourced_proc_dump(int mode, const char *dirpath)
 
                now = time(NULL);
                if (localtime_r(&now, &cur_tm) == NULL)
-                       _E("Fail to get localtime");
+                       _E("[PROCESS] Fail to get localtime");
 
                name_len = snprintf(filename, MAX_NAME_LENGTH,
                                "/%s_%.4d%.2d%.2d%.2d%.2d%.2d.log",
@@ -1852,7 +1849,7 @@ void resourced_proc_dump(int mode, const char *dirpath)
                                cur_tm.tm_mday, cur_tm.tm_hour, cur_tm.tm_min, cur_tm.tm_sec);
 
                if (strlen(dirpath) + name_len + 1 > MAX_PATH_LENGTH) {
-                       _E("Dump path is too long");
+                       _E("[PROCESS] Dump path is too long");
                        return;
                }
 
index d598394..a834d9d 100644 (file)
@@ -106,7 +106,7 @@ static void lowmem_dbus_set_memlimit(GVariant *params)
        pai = find_app_info(pid);
 
        if (pai) {
-               _I("[DEBUG] name: %s, limit: %u", pai->appid, limit);
+               _I("[MEMORY-LIMIT] name: %s, limit: %u", pai->appid, limit);
                if (pai->memory.memlimit_update_exclude)
                        return;
 
index a752999..a259a99 100644 (file)
@@ -88,7 +88,7 @@ static void memory_limit_hash_destroy(gpointer data)
 {
        struct memory_limit_event *mle = (struct memory_limit_event *)data;
        if (!mle) {
-               _E("[DEBUG] Memory limit event structure is NULL");
+               _E("[MEMORY-LIMIT] Memory limit event structure is NULL");
                return;
        }
 
@@ -124,7 +124,7 @@ static int lowmem_limit_broadcast(pid_t pid)
        } else {
                ret = proc_get_cmdline(pid, appname, sizeof appname);
                if (ret < 0) {
-                       _E("[DEBUG] Failed to get cmdline basename of pid(%d)", pid);
+                       _E("[MEMORY-LIMIT] Failed to get cmdline basename of pid(%d)", pid);
                        return ret;
                }
                appid = appname;
@@ -134,7 +134,7 @@ static int lowmem_limit_broadcast(pid_t pid)
                        RESOURCED_INTERFACE_OOM, SIGNAL_OOM_MEMLIMIT_EVENT,
                        g_variant_new("(is)", pid, appid));
        if (ret < 0)
-               _E("[DEBUG] Fail to broadcast dbus signal with pid(%d), appname(%s)", pid, appname);
+               _E("[MEMORY-LIMIT] Fail to broadcast dbus signal with pid(%d), appname(%s)", pid, appname);
 
        return ret;
 }
@@ -144,12 +144,12 @@ static gboolean liveness_check_cb(gpointer data)
        struct memory_limit_event *mle = (struct memory_limit_event *)data;
 
        if (!mle) {
-               _E("[DEBUG] memory limit event structure is NULL");
+               _E("[MEMORY-LIMIT] memory limit event structure is NULL");
                goto timer_out;
        }
 
        if (mle->pids_array == NULL) {
-               _E("[DEBUG] pids array should not be NULL");
+               _E("[MEMORY-LIMIT] pids array should not be NULL");
                goto mle_timer_init;
        }
 
@@ -159,7 +159,7 @@ static gboolean liveness_check_cb(gpointer data)
                        continue;
 
                if (kill(pid, 0) == 0) {
-                       _I("[DEBUG] dir %s's pid (%d) is still avlie, so kill forcely", mle->path, pid);
+                       _I("[MEMORY-LIMIT] dir %s's pid (%d) is still avlie, so kill forcely", mle->path, pid);
                        safe_kill(pid, SIGKILL);
                }
        }
@@ -184,18 +184,18 @@ static bool memory_action_cb(int fd, void *data)
 
        mle = g_hash_table_lookup(memory_limit_hash, cg_dir);
        if (!mle) {
-               _E("invalid event\n");
+               _E("[MEMORY-LIMIT] invalid event\n");
                return false;
        }
 
        result = read(fd, &dummy_efd, sizeof(dummy_efd));
        if (result < 0) {
-               _E("[DEBUG] wrong eventfd %s\n", cg_dir);
+               _E("[MEMORY-LIMIT] wrong eventfd %s\n", cg_dir);
                goto remove_mle;
        }
 
        if (access(cg_dir, F_OK) == -1) {
-               _D("[DEBUG] there is no (%s) cgroup any longer, removing it", cg_dir);
+               _D("[MEMORY-LIMIT] there is no (%s) cgroup any longer, removing it", cg_dir);
                goto remove_mle;
        }
 
@@ -203,13 +203,13 @@ static bool memory_action_cb(int fd, void *data)
        if (result < 0) {
                result = cgroup_read_node_uint32(cg_dir, MEMCG_USAGE, &usage);
                if (result < 0) {
-                       _D("[DEBUG] there is no (%s) cgroup any longer, removed it", cg_dir);
+                       _D("[MEMORY-LIMIT] there is no (%s) cgroup any longer, removed it", cg_dir);
                        goto remove_mle;
                }
        }
 
        if (usage < mle->threshold) {
-               _D("[DEBUG] (%s) cgroup escaped low memory status. usage(%d), threshold(%d)",
+               _D("[MEMORY-LIMIT] (%s) cgroup escaped low memory status. usage(%d), threshold(%d)",
                        cg_dir, usage, mle->threshold);
                return true;
        }
@@ -228,7 +228,7 @@ static bool memory_action_cb(int fd, void *data)
                                        continue;
 
                                if (lowmem_limit_broadcast(pid)) {
-                                       _E("[DEBUG] Failed to broadcast of process (%s)", cg_dir);
+                                       _E("[MEMORY-LIMIT] Failed to broadcast of process (%s)", cg_dir);
                                        safe_kill(pid, SIGTERM);
                                }
                        }
@@ -262,7 +262,7 @@ static bool memory_action_cb(int fd, void *data)
 
                        break;
                default:
-                       _E("[DEBUG] Unkown action of memory threshold");
+                       _E("[MEMORY-LIMIT] Unkown action of memory threshold");
        }
 
        return true;
@@ -298,7 +298,7 @@ int lowmem_reassign_limit(const char *dir,
                memory_limit_hash = g_hash_table_new_full(g_str_hash, g_str_equal,
                                NULL, memory_limit_hash_destroy);
                if (!memory_limit_hash) {
-                       _E("[DEBUG] Failed to create hash table");
+                       _E("[MEMORY-LIMIT] Failed to create hash table");
                        return RESOURCED_ERROR_FAIL;
                }
        }
@@ -316,13 +316,13 @@ int lowmem_reassign_limit(const char *dir,
        if (fd > 0) {
                mle = calloc(1, sizeof(struct memory_limit_event));
                if (!mle) {
-                       _E("[DEBUG] out of memory");
+                       _E("[MEMORY-LIMIT] out of memory");
                        return RESOURCED_ERROR_OUT_OF_MEMORY;
                }
                mle->fd = fd;
                mle->path = (char *)strdup(dir);
                if (!mle->path) {
-                       _E("[DEBUG] out of memory");
+                       _E("[MEMORY-LIMIT] out of memory");
                        free(mle);
                        return RESOURCED_ERROR_OUT_OF_MEMORY;
                }
@@ -354,7 +354,7 @@ int lowmem_limit_move_cgroup(struct proc_app_info *pai)
 
        ret = asprintf(&path, "%s/%s", MEMCG_HIGH_PP_PATH, pai->appid);
        if (ret < 0) {
-               _E("not enough memory");
+               _E("[MEMORY-LIMIT] not enough memory");
                return RESOURCED_ERROR_OUT_OF_MEMORY;
        }
        cgroup_write_pid_fullpath(path, pai->main_pid);
@@ -373,7 +373,7 @@ void lowmem_limit_set_system_service(pid_t pid, unsigned int limit,
        unsigned int totalram = lowmem_get_totalram();
 
        if (limit < MIN_LIMIT_VALUE || limit > totalram) {
-               _E("[DEBUG] It's meaningless to set memory limit with size (%d)", limit);
+               _E("[MEMORY-LIMIT] It's meaningless to set memory limit with size (%d)", limit);
                return;
        }
 
@@ -381,32 +381,32 @@ void lowmem_limit_set_system_service(pid_t pid, unsigned int limit,
                return;
 
        if (!name) {
-               _E("[DEBUG] service name is NULL");
+               _E("[MEMORY-LIMIT] service name is NULL");
                return;
        }
 
        result = asprintf(&path, "%s/%s", MEMCG_HIGH_PP_PATH, name);
        if (result < 0) {
-               _E("[DEBUG] not enough memory");
+               _E("[MEMORY-LIMIT] not enough memory");
                return;
        }
 
        result = cgroup_make_subdir(MEMCG_HIGH_PP_PATH, name, NULL);
        if (result < 0) {
-               _E("[DEBUG] Failed to create cgroup subdir '%s/%s'",
+               _E("[MEMORY-LIMIT] Failed to create cgroup subdir '%s/%s'",
                                MEMCG_HIGH_PP_PATH, name);
                return;
        }
 
        result = lowmem_reassign_limit(path, limit, action);
        if (result < 0) {
-               _W("Failed to reassign limit for %s", path);
+               _W("[MEMORY-LIMIT] Failed to reassign limit for %s", path);
                return;
        }
 
        result = cgroup_write_node_uint32(path, MEMCG_MOVE_CHARGE, 3U);
        if (result < 0)
-               _W("[DEBUG] Failed to set immigrate mode for %s (non-crucial, continuing)", path);
+               _W("[MEMORY-LIMIT] Failed to set immigrate mode for %s (non-crucial, continuing)", path);
 
        cgroup_write_pid_fullpath(path, pid);
 }
@@ -420,37 +420,37 @@ int lowmem_limit_set_app(unsigned int limit, struct proc_app_info *pai,
        unsigned int totalram = lowmem_get_totalram();
 
        if (limit < MIN_LIMIT_VALUE || limit > totalram) {
-               _E("[DEBUG] It's meaningless to set memory limit with size (%d)", limit);
+               _E("[MEMORY-LIMIT] It's meaningless to set memory limit with size (%d)", limit);
                return RESOURCED_ERROR_INVALID_PARAMETER;
        }
 
        if (!pai) {
-               _E("process app information is NULL");
+               _E("[MEMORY-LIMIT] process app information is NULL");
                return RESOURCED_ERROR_INVALID_PARAMETER;
        }
 
        result = asprintf(&path, "%s/%s", MEMCG_HIGH_PP_PATH, pai->appid);
        if (result < 0) {
-               _E("not enough memory");
+               _E("[MEMORY-LIMIT] not enough memory");
                return RESOURCED_ERROR_OUT_OF_MEMORY;
        }
 
        result = cgroup_make_subdir(MEMCG_HIGH_PP_PATH, pai->appid, NULL);
        if (result < 0) {
-               _E("Failed to create cgroup subdir '%s/%s'",
+               _E("[MEMORY-LIMIT] Failed to create cgroup subdir '%s/%s'",
                                MEMCG_HIGH_PP_PATH, pai->appid);
                return result;
        }
 
        result = lowmem_reassign_limit(path, limit, action);
        if (result < 0) {
-               _W("Failed to reassign limit for %s", path);
+               _W("[MEMORY-LIMIT] Failed to reassign limit for %s", path);
                return result;
        }
 
        result = cgroup_write_node_uint32(path, MEMCG_MOVE_CHARGE, 3U);
        if (result < 0)
-               _W("Failed to set immigrate mode for %s (non-crucial, continuing)", path);
+               _W("[MEMORY-LIMIT] Failed to set immigrate mode for %s (non-crucial, continuing)", path);
 
        cgroup_write_pid_fullpath(path, pai->main_pid);
        if (pai->childs) {
@@ -548,7 +548,7 @@ static int lowmem_limit_fgapp(void *data)
            (mem_widget_limit && ps->pai->type == PROC_TYPE_WIDGET))
                return lowmem_limit_appwidget(data);
 
-       _E("[DEBUG] Unable to set foreground app limit - app type not supported");
+       _E("[MEMORY-LIMIT] Unable to set foreground app limit - app type not supported");
 
        return RESOURCED_ERROR_NONE;
 }
@@ -600,7 +600,7 @@ void lowmem_limit_init(void)
        if (mem_bgapp_limit && mem_bgapp_action != PROC_ACTION_IGNORE) {
                if (!(mem_guiapp_limit && mem_guiapp_action != PROC_ACTION_IGNORE) ||
                    !(mem_widget_limit && mem_widget_action != PROC_ACTION_IGNORE)) {
-                       _W("[DEBUG] Background app limit requires that both GUIApp and Widget limits to be set to work properly. Ignoring.");
+                       _W("[MEMORY-LIMIT] Background app limit requires that both GUIApp and Widget limits to be set to work properly. Ignoring.");
                } else {
                        register_notifier(RESOURCED_NOTIFIER_APP_BACKGRD, lowmem_limit_bgapp);
                        register_notifier(RESOURCED_NOTIFIER_APP_FOREGRD, lowmem_limit_fgapp);
index cb822ee..f755c57 100644 (file)
@@ -1473,7 +1473,7 @@ static void lowmem_move_memcgroup(int pid, int next_oom_score_adj, struct proc_a
                if (cur_oom_score_adj != OOMADJ_APP_MAX + 10) {
                        /* VIP processes should not be asked to move. */
                        if (cur_memcg_idx <= CGROUP_VIP) {
-                               _E("[DEBUG] current cgroup (%s) cannot be VIP or Root", convert_cgroup_type_to_str(cur_memcg_idx));
+                               _E("[MEMORY-CGROUP] current cgroup (%s) cannot be VIP or Root", convert_cgroup_type_to_str(cur_memcg_idx));
                                return;
                        }
                }
@@ -1902,24 +1902,24 @@ static void print_mem_configs(void)
 {
        /* print info of Memory section */
        for (int cgroup = CGROUP_VIP; cgroup < CGROUP_END; cgroup++) {
-               _I("[DEBUG] set memory for cgroup '%s' to %u bytes",
+               _I("[MEMORY-CGROUP] set memory for cgroup '%s' to %u bytes",
                                convert_cgroup_type_to_str(cgroup), get_memcg_info(cgroup)->limit);
        }
 
        for (int mem_lvl = 0; mem_lvl < MEM_LEVEL_MAX; mem_lvl++)
-               _I("[DEBUG] set threshold for memory level '%s' to %u MB",
+               _I("[MEMORY-LEVEL] set threshold for memory level '%s' to %u MB",
                                convert_memstate_to_str(mem_lvl), get_root_memcg_info()->threshold[mem_lvl]);
 
-       _I("[DEBUG] set number of max victims as %d", num_max_victims);
-       _I("[DEBUG] set threshold leave to %u MB", get_root_memcg_info()->threshold_leave);
-       _I("[DEBUG] set proactive threshold to %u MB", proactive_threshold);
-       _I("[DEBUG] set proactive low memory killer leave to %u MB", proactive_leave);
+       _I("[LMK] set number of max victims as %d", num_max_victims);
+       _I("[LMK] set threshold leave to %u MB", get_root_memcg_info()->threshold_leave);
+       _I("[LMK] set proactive threshold to %u MB", proactive_threshold);
+       _I("[LMK] set proactive low memory killer leave to %u MB", proactive_leave);
 
        /* print info of POPUP section */
-       _I("[DEBUG] oom popup is %s", oom_popup_enable == true ? "enabled" : "disabled");
+       _I("[POPUP] oom popup is %s", oom_popup_enable == true ? "enabled" : "disabled");
 
        /* print info of BackgroundReclaim section */
-       _I("[DEBUG] Background reclaim is %s", bg_reclaim == true ? "enabled" : "disabled");
+       _I("Background reclaim is %s", bg_reclaim == true ? "enabled" : "disabled");
 }
 
 #include "file-helper.h"
@@ -1929,7 +1929,7 @@ static int lowmem_init(void)
 {
        int ret = RESOURCED_ERROR_NONE;
 
-       _D("[DEBUG] resourced memory init start");
+       _D("resourced memory init start");
 
        /* init memcg */
        ret = cgroup_make_full_subdir(MEMCG_PATH);
@@ -1948,14 +1948,14 @@ static int lowmem_init(void)
        /* make a worker thread called low memory killer */
        ret = lowmem_activate_worker();
        if (ret) {
-               _E("[DEBUG] oom thread create failed\n");
+               _E("[LMK] oom thread create failed\n");
                return ret;
        }
 
        /* register threshold and event fd */
        ret = lowmem_press_setup_eventfd();
        if (ret) {
-               _E("[DEBUG] eventfd setup failed");
+               _E("[MEMORY-LIMIT] eventfd setup failed");
                return ret;
        }
 
index 2f5d84c..a226d17 100644 (file)
@@ -94,20 +94,20 @@ static int cpu_sched_init_cgroup_set(const struct coreset *set)
 
        r = cgroup_make_subdir(CPUSET_CGROUP, set->name, NULL);
        if (r < 0) {
-               _E("[DEBUG] failed to make cpuset cgroup (%s)", set->name);
+               _E("[CPU-SCHED] failed to make cpuset cgroup (%s)", set->name);
                return r;
        }
 
        r = snprintf(buf, sizeof buf, "%s/%s", CPUSET_CGROUP, set->name);
        if (r < 0) {
-               _E("[DEBUG] failed to setup memory nodes for cpuset (%s)", set->name);
+               _E("[CPU-SCHED] failed to setup memory nodes for cpuset (%s)", set->name);
                return r;
        }
 
        /* don't force any memory nodes with this cpuset */
        r = cgroup_write_node_uint32(buf, "cpuset.mems", 0);
        ret_value_msg_if(r < 0, r,
-               "[DEBUG] Failed to reset memory nodes for cpuset: %m");
+               "[CPU-SCHED] Failed to reset memory nodes for cpuset: %m");
 
        return 0;
 }
@@ -257,7 +257,7 @@ static int load_cpu_affinity_config(struct cpu_sched *data)
        c->name = name;
 
        if (cpu_sched_parse_cpuset(c, get_cpucg_conf_value()) < 0) {
-               _E("[DEBUG] cpu-sched parse %s coreset: could not parse", name);
+               _E("[CPU-SCHED] cpu-sched parse %s coreset: could not parse", name);
                return RESOURCED_ERROR_FAIL;
        }
 
@@ -274,7 +274,7 @@ static int load_cpu_sched_config(void)
 {
        struct cpu_sched_conf *cpu_sched_conf = get_cpu_sched_conf();
        if (cpu_sched_conf == NULL) {
-               _E("[DEBUG] cpu sched configuration structure should not be NULL");
+               _E("[CPU-SCHED] cpu sched configuration structure should not be NULL");
                return RESOURCED_ERROR_FAIL;
        }
 
@@ -288,7 +288,7 @@ static int load_cpu_sched_config(void)
        if (cpu_sched_conf->cpu_sched_flag) {
                if (CHECK_BIT(cpu_sched_conf->cpu_sched_flag, CPU_SCHED_RUNTIME_SHARE) &&
                    CHECK_BIT(cpu_sched_conf->cpu_sched_flag, CPU_SCHED_NO_RUNTIME_SHARE)) {
-                       _E("[DEBUG] RT_RUNTIME_SHARE and NO_RT_RUNTIME_SHARE cannot be coexisted");
+                       _E("[CPU-SCHED] RT_RUNTIME_SHARE and NO_RT_RUNTIME_SHARE cannot be coexisted");
                }
                else {
                        /* RT_RUNTIME_SHARE */
@@ -303,9 +303,9 @@ static int load_cpu_sched_config(void)
                }
        }
 
-       _I("[DEBUG] rt_period_us = %d", cpu_sched_conf->rt_period_us);
-       _I("[DEBUG] rt_runtime_us = %d", cpu_sched_conf->rt_runtime_us);
-       _I("[DEBUG] cpu_sched_feature = %d", cpu_sched_conf->cpu_sched_flag);
+       _I("[CPU-SCHED] rt_period_us = %d", cpu_sched_conf->rt_period_us);
+       _I("[CPU-SCHED] rt_runtime_us = %d", cpu_sched_conf->rt_runtime_us);
+       _I("[CPU-SCHED] cpu_sched_feature = %d", cpu_sched_conf->cpu_sched_flag);
 
        free_cpu_sched_conf();
        return RESOURCED_ERROR_NONE;
@@ -546,7 +546,7 @@ static int cpu_sched_rt_scheduler(void *data)
 
        result = cgroup_read_node_int32(CPUCG_PATH, CPUCG_RT_CONTROL_BANDWIDTH, &runtime);
        if (result < 0) {
-               _W("[DEBUG] rt_runtime_us is not supported");
+               _W("[CPU-SCHED] rt_runtime_us is not supported");
                return RESOURCED_ERROR_FAIL;
        }
 
@@ -555,13 +555,13 @@ static int cpu_sched_rt_scheduler(void *data)
 
        result = asprintf(&path, "%s/%s", CPUCG_HIGH_PP_PATH, ps->pci->name);
        if (result < 0) {
-               _E("[DEBUG] not enough memory");
+               _E("[CPU-SCHED] not enough memory");
                return RESOURCED_ERROR_OUT_OF_MEMORY;
        }
 
        result = cgroup_make_subdir(CPUCG_HIGH_PP_PATH, ps->pci->name, NULL);
        if (result < 0) {
-               _E("[DEBUG] Failed to create cgroup subdir '%s/%s'",
+               _E("[CPU-SCHED] Failed to create cgroup subdir '%s/%s'",
                                CPUCG_HIGH_PP_PATH, ps->pci->name);
                return RESOURCED_ERROR_FAIL;
        }
index 31251a5..932d6d2 100644 (file)
@@ -588,8 +588,8 @@ static int compact_parse_config_file(struct compact_control *compact)
 
        free_compact_conf();
 
-       _I("[DEBUG] compact status: %d", compact->status);
-       _I("[DEBUG] compact frag_level: %d", compact->frag_level);
+       _I("[COMPACTION] compact status: %d", compact->status);
+       _I("[COMPACTION] compact frag_level: %d", compact->frag_level);
 
        return RESOURCED_ERROR_NONE;
 }
@@ -600,11 +600,11 @@ static int compact_init(void *data)
        struct compact_control  *compact;
        int result = RESOURCED_ERROR_OUT_OF_MEMORY;
 
-       _I("[DEBUG] compact init");
+       _I("[COMPACTION] compact init");
 
        pthread_mutex_lock(&compact_data.drained_lock);
        if (compact_data.compact) {
-               _E("[DEBUG] Unbalanced calls to compact module load/unload\n");
+               _E("[COMPACTION] Unbalanced calls to compact module load/unload\n");
                result = RESOURCED_ERROR_NONE;
                goto leave;
        }
@@ -622,7 +622,7 @@ static int compact_init(void *data)
 
        result = pthread_mutex_init(&compact->lock, NULL);
        if (result) {
-               _E("[DEBUG] Failed to init compact lock: %m");
+               _E("[COMPACTION] Failed to init compact lock: %m");
                goto cleanup_all;
        }
 
@@ -630,7 +630,7 @@ static int compact_init(void *data)
        compact_parse_config_file(compact);
 
        if (compact->status & COMPACT_SKIP) {
-               _I("[DEBUG] Compaction module disabled.");
+               _I("[COMPACTION] Compaction module disabled.");
                result = RESOURCED_ERROR_FAIL;
                goto cleanup_all;
        }
index 58b09f9..5e0c487 100644 (file)
@@ -109,8 +109,8 @@ static int swap_file_init(void *data)
 
 static int swap_file_conf(void *data)
 {
-       _I("[DEBUG] fileswap crypt type = %s", file_control.crypt_type);
-       _I("[DEBUG] fileswap file size = %ld", file_control.swap_file_size);
+       _I("[SWAP] fileswap crypt type = %s", file_control.crypt_type);
+       _I("[SWAP] fileswap file size = %ld", file_control.swap_file_size);
 
        return RESOURCED_ERROR_NONE;
 }
index bc0bb69..776fbec 100644 (file)
@@ -823,12 +823,12 @@ static void swap_dbus_init(void)
 
 static void print_swap_conf(void)
 {
-       _I("[DEBUG] swap %s", arg_swap_enable == true ? "enable" : "disable");
-       _I("[DEBUG] swap at boot %s", arg_swap_at_boot == true ? "enable" : "disable");
-       _I("[DEBUG] swap type = %d", arg_swap_type);
+       _I("[SWAP] swap %s", arg_swap_enable == true ? "enable" : "disable");
+       _I("[SWAP] swap at boot %s", arg_swap_at_boot == true ? "enable" : "disable");
+       _I("[SWAP] swap type = %d", arg_swap_type);
 
        for(int cgroup = CGROUP_VIP; cgroup < CGROUP_END; cgroup++) {
-               _I("[DEBUG] cgroup (%s) swapiness = %d", cgroup == CGROUP_VIP ? "vip" :
+               _I("[SWAP] cgroup (%s) swapiness = %d", cgroup == CGROUP_VIP ? "vip" :
                                cgroup == CGROUP_HIGH ? "high" :
                                cgroup == CGROUP_MEDIUM ? "medium" : "lowest", get_memcg_info(cgroup)->swappiness);
        }
index a989bee..4d0e6fa 100644 (file)
@@ -280,8 +280,8 @@ static int swap_zram_conf(void *data)
        if (zram_conf->ratio > 0.0)
                zram_control.ratio = zram_conf->ratio;
 
-       _I("[DEBUG] zram algorithm = %s", zram_control.comp_algorithm);
-       _I("[DEBUG] zram ratio = %f", zram_control.ratio);
+       _I("[SWAP] zram algorithm = %s", zram_control.comp_algorithm);
+       _I("[SWAP] zram ratio = %f", zram_control.ratio);
 
        return RESOURCED_ERROR_NONE;
 }
index 00653b6..213d1e6 100644 (file)
@@ -126,7 +126,7 @@ static int swap_zswap_conf(void *data)
 {
        struct zswap_conf *zswap_conf = (struct zswap_conf *)data;
        if (!zswap_conf) {
-               _E("[DEBUG] Zswap configuration should not be NULL");
+               _E("[SWAP] Zswap configuration should not be NULL");
                return RESOURCED_ERROR_FAIL;
        }
 
@@ -138,10 +138,10 @@ static int swap_zswap_conf(void *data)
        else
                memset(zswap_control.zpool_type, 0, MAX_TYPE_LENGTH);
 
-       _I("[DEBUG] zswap type = %s", zswap_control.crypt_type);
-       _I("[DEBUG] zswap filesize = %ld", zswap_control.zswap_file_size);
-       _I("[DEBUG] zswap pool ratio = %f", zswap_control.zpool_ratio);
-       _I("[DEBUG] zswap pool type = %s", zswap_control.zpool_type);
+       _I("[SWAP] zswap type = %s", zswap_control.crypt_type);
+       _I("[SWAP] zswap filesize = %ld", zswap_control.zswap_file_size);
+       _I("[SWAP] zswap pool ratio = %f", zswap_control.zpool_ratio);
+       _I("[SWAP] zswap pool type = %s", zswap_control.zpool_type);
 
        return RESOURCED_ERROR_NONE;
 
index 6d4e237..4b4733c 100644 (file)
@@ -231,21 +231,21 @@ int fixed_service_list_init(void *data)
                pid_t pid = -1;
 
                if (!pci) {
-                       _E("[DEBUG] process configuration information is NULL");
+                       _E("process configuration information is NULL");
                        continue;
                }
 
                if (strncmp(pci->name, name, strlen(name) +1)) {
-                       _E("[DEBUG] key (%s) should be same with service name (%s)", name, pci->name);
+                       _E("key (%s) should be same with service name (%s)", name, pci->name);
                        continue;
                }
 
                variant = systemd_get_service_property(pci->name, "ExecMainPID");
                if (!g_variant_get_safe(variant, "u", &pid))
-                       _E("[DEBUG] Failed to get pid of a service (%s)", pci->name);
+                       _E("Failed to get pid of a service (%s)", pci->name);
 
                if (pid <= 0) {
-                       _W("[DEBUG] name (%s) pid should be larger than 0", pci->name);
+                       _W("name (%s) pid should be larger than 0", pci->name);
                        continue;
                }
 
@@ -286,10 +286,10 @@ int fixed_service_list_init(void *data)
                                sched_setattr(pid, &attr, 0);
                                error = sched_getattr(pid, &attr, 0);
                                if (error)
-                                       _E("[DEBUG] Failed to get sched attributes");
+                                       _E("[CPU-SCHED] Failed to get sched attributes");
 
                                if (attr.sched_policy != SCHED_OTHER)
-                                       _E("[DEBUG] current policy (%d) is different from %d",
+                                       _E("[CPU-SCHED] current policy (%d) is different from %d",
                                        attr.sched_policy, SCHED_OTHER);
                                break;
                        case CPU_SCHED_IDLE:
@@ -297,10 +297,10 @@ int fixed_service_list_init(void *data)
                                sched_setattr(pid, &attr, 0);
                                error = sched_getattr(pid, &attr, 0);
                                if (error)
-                                       _E("[DEBUG] Failed to get sched attributes");
+                                       _E("[CPU-SCHED] Failed to get sched attributes");
 
                                if (attr.sched_policy != SCHED_IDLE)
-                                       _E("[DEBUG] current policy (%d) is different from %d",
+                                       _E("[CPU-SCHED] current policy (%d) is different from %d",
                                        attr.sched_policy, SCHED_IDLE);
                                break;
                        case CPU_SCHED_BATCH:
@@ -308,10 +308,10 @@ int fixed_service_list_init(void *data)
                                sched_setattr(pid, &attr, 0);
                                error = sched_getattr(pid, &attr, 0);
                                if (error)
-                                       _E("[DEBUG] Failed to get sched attributes");
+                                       _E("[CPU-SCHED] Failed to get sched attributes");
 
                                if (attr.sched_policy != SCHED_BATCH)
-                                       _E("[DEBUG] current policy (%d) is different from %d",
+                                       _E("[CPU-SCHED] current policy (%d) is different from %d",
                                        attr.sched_policy, SCHED_BATCH);
                                break;
                        case CPU_SCHED_FIFO:
@@ -319,10 +319,10 @@ int fixed_service_list_init(void *data)
                                sched_setattr(pid, &attr, 0);
                                error = sched_getattr(pid, &attr, 0);
                                if (error)
-                                       _E("[DEBUG] Failed to get sched attributes");
+                                       _E("[CPU-SCHED] Failed to get sched attributes");
 
                                if (attr.sched_policy != SCHED_FIFO)
-                                       _E("[DEBUG] current policy (%d) is different from %d",
+                                       _E("[CPU-SCHED] current policy (%d) is different from %d",
                                        attr.sched_policy, SCHED_FIFO);
                                break;
                        case CPU_SCHED_RR:
@@ -330,10 +330,10 @@ int fixed_service_list_init(void *data)
                                sched_setattr(pid, &attr, 0);
                                error = sched_getattr(pid, &attr, 0);
                                if (error)
-                                       _E("[DEBUG] Failed to get sched attributes");
+                                       _E("[CPU-SCHED] Failed to get sched attributes");
 
                                if (attr.sched_policy != SCHED_RR)
-                                       _E("[DEBUG] current policy (%d) is different from %d",
+                                       _E("[CPU-SCHED] current policy (%d) is different from %d",
                                        attr.sched_policy, SCHED_RR);
                                break;
                        case CPU_SCHED_DEADLINE:
@@ -341,20 +341,20 @@ int fixed_service_list_init(void *data)
                                sched_setattr(pid, &attr, 0);
                                error = sched_getattr(pid, &attr, 0);
                                if (error)
-                                       _E("[DEBUG] Failed to get sched attributes");
+                                       _E("[CPU-SCHED] Failed to get sched attributes");
                                break;
                        default:
-                               _E("[DEBUG] Unknown CPU sched type");
+                               _E("[CPU-SCHED] Unknown CPU sched type");
                }
 
-               _I("[DEBUG] %s's (pid = %d) policy = %s", pci->name, pid, attr.sched_policy == SCHED_IDLE ? "SCHED_IDLE" :
+               _I("[CPU-SCHED] %s's (pid = %d) policy = %s", pci->name, pid, attr.sched_policy == SCHED_IDLE ? "SCHED_IDLE" :
                                          attr.sched_policy == SCHED_BATCH ? "SCHED_BATCH" :
                                                                  attr.sched_policy == SCHED_OTHER ? "SCHED_OTHER" :
                                                                  attr.sched_policy == SCHED_FIFO ? "SCHED_FIFO" :
                                                                  attr.sched_policy == SCHED_RR ? "SCHED_RR" :
                                                                  attr.sched_policy == SCHED_DEADLINE ? "SCHED_DEADLINE" : "UNKNOWN");
-               _I("[DEBUG] %s's nice = %d", pci->name, attr.sched_nice);
-               _I("[DEBUG] %s's priority = %d", pci->name, attr.sched_priority);
+               _I("[CPU-SCHED] %s's nice = %d", pci->name, attr.sched_nice);
+               _I("[CPU-SCHED] %s's priority = %d", pci->name, attr.sched_priority);
 
                /* register a notification when this service is released */
                switch (pci->fail_action) {
@@ -364,7 +364,7 @@ int fixed_service_list_init(void *data)
                        case PROC_ACTION_IGNORE:
                                break;
                        default:
-                               _W("[DEBUG] Currently we support only REBOOT when a service is released");
+                               _W("[WATCHDOG] Currently we support only REBOOT when a service is released");
                }
 
                /* register RT throttling */