When the --verbose option is selected, the first value for each thread is incorrectly reported as zero. This is because when collecting the first value, the index into stat->values is incremented from zero to one before storing the value. But when printing the values, the first value printed is stat->values[0], which has been initialized to zero. Signed-off-by: Frank Rowand <frank.rowand@xxxxxxxxxxx> --- src/cyclictest/cyclictest.c | 3 2 + 1 - 0 ! 1 file changed, 2 insertions(+), 1 deletion(-) Index: b/src/cyclictest/cyclictest.c =================================================================== --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -756,7 +756,6 @@ void *timerthread(void *param) pthread_mutex_unlock(&break_thread_id_lock); } stat->act = diff; - stat->cycles++; if (par->bufmsk) stat->values[stat->cycles & par->bufmsk] = diff; @@ -769,6 +768,8 @@ void *timerthread(void *param) stat->hist_array[diff]++; } + stat->cycles++; + next.tv_sec += interval.tv_sec; next.tv_nsec += interval.tv_nsec; if (par->mode == MODE_CYCLIC) { -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html