According to documentation the default value of 'loop' is -1, but the threads without a loop field runs only once and stops. This was broken long back, perhaps unintentionally though.
Fix it.
Fixes: 82dae3e5ee2f ("simplify the grammar") Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- src/rt-app_parse_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rt-app_parse_config.c b/src/rt-app_parse_config.c index e5ef87f6ee3e..96bd2d299389 100644 --- a/src/rt-app_parse_config.c +++ b/src/rt-app_parse_config.c @@ -605,7 +605,7 @@ parse_thread_phase_data(struct json_object *obj, int i;
/* loop */ - data->loop = get_int_value_from(obj, "loop", TRUE, 1); + data->loop = get_int_value_from(obj, "loop", TRUE, -1);
/* Count number of events */ data->nbevents = 0;
Le Thursday 16 Feb 2017 à 16:09:33 (+0530), Viresh Kumar a écrit :
According to documentation the default value of 'loop' is -1, but the threads without a loop field runs only once and stops. This was broken long back, perhaps unintentionally though.
So the default value of loop at thread level is -1 but the default value for loop at phase level should be 1 to make sure that we move to the next phase if any
Fix it.
Fixes: 82dae3e5ee2f ("simplify the grammar") Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
src/rt-app_parse_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rt-app_parse_config.c b/src/rt-app_parse_config.c index e5ef87f6ee3e..96bd2d299389 100644 --- a/src/rt-app_parse_config.c +++ b/src/rt-app_parse_config.c @@ -605,7 +605,7 @@ parse_thread_phase_data(struct json_object *obj, int i; /* loop */
- data->loop = get_int_value_from(obj, "loop", TRUE, 1);
- data->loop = get_int_value_from(obj, "loop", TRUE, -1);
This one is for phase and must return 1
Your problem comes from that when we don't have "phases" node and put the events in the thread node which is probably your case, we set the loop field at thread level to 1 instead of -1 The patch below should fix your issue:
--- a/src/rt-app_parse_config.c +++ b/src/rt-app_parse_config.c @@ -734,7 +734,7 @@ parse_thread_data(char *name, struct json_object *obj, int index, data->phases = malloc(sizeof(phase_data_t) * data->nphases); parse_thread_phase_data(obj, &data->phases[0], opts, (long)data); /* Get loop number */ - data->loop = 1; + data->loop = -1; }
}
On 16-02-17, 12:02, Vincent Guittot wrote:
Le Thursday 16 Feb 2017 à 16:09:33 (+0530), Viresh Kumar a écrit :
According to documentation the default value of 'loop' is -1, but the threads without a loop field runs only once and stops. This was broken long back, perhaps unintentionally though.
So the default value of loop at thread level is -1 but the default value for loop at phase level should be 1 to make sure that we move to the next phase if any
Fix it.
Fixes: 82dae3e5ee2f ("simplify the grammar") Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
src/rt-app_parse_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rt-app_parse_config.c b/src/rt-app_parse_config.c index e5ef87f6ee3e..96bd2d299389 100644 --- a/src/rt-app_parse_config.c +++ b/src/rt-app_parse_config.c @@ -605,7 +605,7 @@ parse_thread_phase_data(struct json_object *obj, int i; /* loop */
- data->loop = get_int_value_from(obj, "loop", TRUE, 1);
- data->loop = get_int_value_from(obj, "loop", TRUE, -1);
This one is for phase and must return 1
Your problem comes from that when we don't have "phases" node and put the events in the thread node which is probably your case, we set the loop field at thread level to 1 instead of -1 The patch below should fix your issue:
--- a/src/rt-app_parse_config.c +++ b/src/rt-app_parse_config.c @@ -734,7 +734,7 @@ parse_thread_data(char *name, struct json_object *obj, int index, data->phases = malloc(sizeof(phase_data_t) * data->nphases); parse_thread_phase_data(obj, &data->phases[0], opts, (long)data); /* Get loop number */
data->loop = 1;
}data->loop = -1;
Ah thanks. Both of them worked in my case which didn't had any phases. Updated to your version now.