Allow the DSL to provide a task_snprintf function and use it when displaying the DOT#409
Conversation
…playing the DOT Signed-off-by: Thomas Herault <herault@icl.utk.edu> Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
| char tmp[MAX_TASK_STRLEN], nmp[MAX_TASK_STRLEN]; | ||
| char sim_date[64]; | ||
| parsec_task_snprintf(tmp, MAX_TASK_STRLEN, context); | ||
| if(NULL != context->task_class->task_snprintf) { |
There was a problem hiding this comment.
Let's make it the default to use the task class accessor.
There was a problem hiding this comment.
You mean we should provide task_snprintf callbacks for DTD and PTG by default?
There was a problem hiding this comment.
yes, always use task_class->task_snprintf.
There was a problem hiding this comment.
So there are two ways of going with this. We're using parsec_task_snprintf in many places and all of them would have to be adjusted:
- Use
parsec_task_snprintfas the default implementation intask_class. That would require replacing all calls toparsec_task_snprintfwithtask->task_class->task_snprintf. - Inside
parsec_task_snprintf, check iftask_class->task_snprintfis set and if not fallback to the current implementation. This would not require us to touch all the places that callparsec_task_snprintf.
I'm leaning to (1) although it will make this PR significantly bigger...
There was a problem hiding this comment.
(1) should be implemented now.
NB: debugging still falls back on parsec_task_snprintf(). We may want to change this to always call task_class->task_snprintf (or have a more robust version that checks if it exists for debugging purpose, as Joseph suggested). For now, only parsec_prof_grapher uses task_class->task_snprintf. I think changing everything could be another PR, but if you think we should also do that change now, speak up before merging.
… parsec_hash_table_t
… value and its size is the same size of an int display it as an int, otherwise display '_'
… task_snprintf we use for debugging
This feature was lost in a previous merge accident, but it should have been enabled via PR ICLDisco#409
Backport from the TTG branches...
Signed-off-by: Thomas Herault herault@icl.utk.edu
Signed-off-by: Joseph Schuchart schuchart@icl.utk.edu