cpu : remove the element of not used termiated app 28/237228/1 accepted/tizen/unified/20200626.133418 submit/tizen/20200626.064746
authorKichan Kwon <k_c.kwon@samsung.com>
Fri, 26 Jun 2020 03:15:11 +0000 (12:15 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Fri, 26 Jun 2020 06:10:06 +0000 (15:10 +0900)
Change-Id: I255e3f100a826bd8966ab0a60240a1fbe8f6b3d0
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
plugin/cpu/src/bm_cpu_plugin.c

index 370c706..285b051 100644 (file)
@@ -389,7 +389,7 @@ int get_feature_data(bm_data_h *handle, bm_plugin_data_type_e type)
                elapsed = app_status->cur_used_time - app_status->last_used_time;
                if (elapsed <= 0) {
                        _D("%s(PID=%u) doesn't use CPU. Ignore it", buf, pid);
-                       continue;
+                       goto update_list;
                }
 
                _I("%s(PID=%u) uses CPU (+%d ms)", buf, pid, elapsed);
@@ -417,6 +417,7 @@ int get_feature_data(bm_data_h *handle, bm_plugin_data_type_e type)
 
                app_time_map->time += elapsed;
 
+update_list:
                /* Remove terminated app's status */
                if (is_terminated) {
                        _D("%s(PID=%u) is already terminated", buf, pid);