summaryrefslogtreecommitdiffstats
path: root/src/stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stats.c')
-rw-r--r--src/stats.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/stats.c b/src/stats.c
index a70ef4e..b1c8dda 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -91,7 +91,7 @@ int lt_stats_alloc(struct lt_config_app *cfg, struct lt_thread *t)
t->sym_max += LT_SYM_HMAX;
hdestroy_r(&t->sym_htab);
- PRINT_VERBOSE(cfg, 1, "creating new hash table\n");
+ PRINT_VERBOSE(cfg, 1, "%s\n", "creating new hash table");
if (!hcreate_r(t->sym_max, &t->sym_htab)) {
perror("hcreate_r failed");
@@ -126,7 +126,7 @@ int lt_stats_alloc(struct lt_config_app *cfg, struct lt_thread *t)
}
}
- PRINT_VERBOSE(cfg, 1, "reallocation ok\n");
+ PRINT_VERBOSE(cfg, 1, "%s\n", "reallocation ok");
return 0;
}
@@ -244,7 +244,8 @@ static int lt_stats_show_thread(struct lt_config_app *cfg, struct lt_thread *t)
struct timeval tv_thread_accu = { 0, 0};
float time_global;
- PRINT_VERBOSE(cfg, 1, "counting total time\n");
+ PRINT_VERBOSE(cfg, 1, "%s\n", "counting total time");
+
for(i = 0; i < t->sym_cnt; i++) {
struct lt_stats_sym *sym = t->sym_array[i];
tv_add(&tv_thread_accu, &tv_thread_accu, &sym->tv_all);
@@ -252,7 +253,7 @@ static int lt_stats_show_thread(struct lt_config_app *cfg, struct lt_thread *t)
time_global = tv_thread_accu.tv_sec * 1000000 + tv_thread_accu.tv_usec;
- PRINT_VERBOSE(cfg, 1, "counting post mortem statistics\n");
+ PRINT_VERBOSE(cfg, 1, "%s\n", "counting post mortem statistics");
for(i = 0; i < t->sym_cnt; i++) {
struct lt_stats_sym *sym = t->sym_array[i];
@@ -262,12 +263,12 @@ static int lt_stats_show_thread(struct lt_config_app *cfg, struct lt_thread *t)
sym->usec_call = time_sym/sym->call;
}
- PRINT_VERBOSE(cfg, 1, "sorting\n");
+ PRINT_VERBOSE(cfg, 1, "%s\n", "sorting");
csort = cfg->csort;
qsort(t->sym_array, t->sym_cnt, sizeof(struct lt_stats_sym*), qsort_compar);
- PRINT_VERBOSE(cfg, 1, "printing\n");
+ PRINT_VERBOSE(cfg, 1, "%s\n", "printing");
tv_sub(&tv_thread_real, &t->tv_stop, &t->tv_start);
printf("\nThread %d (runtime %u.%06u sec)\n",