On Wed, Mar 11, 2015 at 1:36 AM, Vincent Guittot <vincent.guittot@linaro.org> wrote:
> Add the thread's index in the log and plot filename in order to have one
> set of files per instance.
>
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
>  src/rt-app.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/rt-app.c b/src/rt-app.c
> index 68c278d..cc96955 100644
> --- a/src/rt-app.c
> +++ b/src/rt-app.c
> @@ -557,10 +557,11 @@ int main(int argc, char* argv[])
>                 tdata->lock_pages = opts.lock_pages;
>
>                 if (opts.logdir) {
> -                       snprintf(tmp, PATH_LENGTH, "%s/%s-%s.log",
> +                       snprintf(tmp, PATH_LENGTH, "%s/%s-%s-%d.log",
>                                  opts.logdir,
>                                  opts.logbasename,
> -                                tdata->name);
> +                                tdata->name,
> +                                tdata->ind);
>                         tdata->log_handler = fopen(tmp, "w");
>                         if (!tdata->log_handler) {
>                                 log_error("Cannot open logfile %s", tmp);
> @@ -641,8 +642,8 @@ int main(int argc, char* argv[])
>
>                 /* gnuplot of each task */
>                 for (i=0; i<nthreads; i++) {
> -                       snprintf(tmp, PATH_LENGTH, "%s/%s-%s.plot",
> -                                opts.logdir, opts.logbasename, opts.threads_data[i].name);
> +                       snprintf(tmp, PATH_LENGTH, "%s/%s-%s-%d.plot",
> +                                opts.logdir, opts.logbasename, opts.threads_data[i].name, opts.threads_data[i].ind );
>                         gnuplot_script = fopen(tmp, "w+");
>                         snprintf(tmp, PATH_LENGTH, "%s-%s.eps",
>                                 opts.logbasename, opts.threads_data[i].name);
> --
> 1.9.1
>
>
> _______________________________________________
> Sched-tools mailing list
> Sched-tools@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/sched-tools

Vincent,

   This and the two previous patches help make things easier. But I still cannot get expected results.
For 1 iteration two threads cases such as [1], it works as expected. For more than 1 iteration cases,
such as the 2 iterations case [2], it's not what I expected. Logs are in [3].

[1] h-l-rev-1.json

--
// freedom