aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bristot de Oliveira <bristot@redhat.com>2020-10-21 14:32:34 +0200
committerDaniel Bristot de Oliveira <bristot@redhat.com>2020-10-21 14:32:34 +0200
commitebb85564ca5a7b807bb6331b3612e07801488a53 (patch)
tree7fe5b5dd14564fd271c87a65d39c8bf453b55abb
parent3dbaf78dfed9cbebfd9df30343f23da71adbf1eb (diff)
downloadstalld-ebb85564ca5a7b807bb6331b3612e07801488a53.tar.gz
src/stalld: Reuse already read nr_running nr_rt_running
Self explained. Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
-rw-r--r--src/stalld.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stalld.c b/src/stalld.c
index 0381247..d99a6da 100644
--- a/src/stalld.c
+++ b/src/stalld.c
@@ -346,8 +346,8 @@ int parse_cpu_info(struct cpu_info *cpu_info, char *buffer, int buffer_size)
goto out_free;
}
- cpu_info->nr_running = get_variable_long_value(cpu_buffer, ".nr_running");
- cpu_info->nr_rt_running = get_variable_long_value(cpu_buffer, ".rt_nr_running");
+ cpu_info->nr_running = nr_running;
+ cpu_info->nr_rt_running = nr_rt_running;
cpu_info->starving = malloc(sizeof(struct task_info) * cpu_info->nr_running);
cpu_info->nr_waiting_tasks = fill_waiting_task(cpu_buffer, cpu_info->starving, cpu_info->nr_running);