|
@@ -275,6 +275,17 @@ static void worker_set_state(double time, const char *prefix, long unsigned int
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
+static void worker_set_detailed_state(double time, const char *prefix, long unsigned int workerid, const char *name, unsigned long size, unsigned long footprint, unsigned long long tag)
|
|
|
+{
|
|
|
+#ifdef STARPU_HAVE_POTI
|
|
|
+ char container[STARPU_POTI_STR_LEN];
|
|
|
+ thread_container_alias(container, STARPU_POTI_STR_LEN, prefix, workerid);
|
|
|
+ poti_SetState(time, container, "S", name);
|
|
|
+#else
|
|
|
+ fprintf(out_paje_file, "20 %.9f %st%lu S %s %lu %08lx %016llx\n", time, prefix, workerid, name, size, footprint, tag);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
static void worker_push_state(double time, const char *prefix, long unsigned int workerid, const char *name)
|
|
|
{
|
|
|
#ifdef STARPU_HAVE_POTI
|
|
@@ -631,11 +642,8 @@ static void handle_start_codelet_body(struct fxt_ev_64 *ev, struct starpu_fxt_op
|
|
|
int worker;
|
|
|
worker = find_worker_id(ev->param[2]);
|
|
|
|
|
|
- unsigned sched_ctx = ev->param[1];
|
|
|
if (worker < 0) return;
|
|
|
|
|
|
- char *prefix = options->file_prefix;
|
|
|
-
|
|
|
unsigned long has_name = ev->param[3];
|
|
|
char *name = has_name?(char *)&ev->param[4]:"unknown";
|
|
|
|
|
@@ -646,8 +654,12 @@ static void handle_start_codelet_body(struct fxt_ev_64 *ev, struct starpu_fxt_op
|
|
|
|
|
|
create_paje_state_if_not_found(name, options);
|
|
|
|
|
|
+#ifndef STARPU_ENABLE_PAJE_CODELET_DETAILS
|
|
|
if (out_paje_file)
|
|
|
{
|
|
|
+ char *prefix = options->file_prefix;
|
|
|
+ unsigned sched_ctx = ev->param[1];
|
|
|
+
|
|
|
worker_set_state(start_codelet_time, prefix, ev->param[2], name);
|
|
|
if (sched_ctx != 0)
|
|
|
{
|
|
@@ -662,7 +674,38 @@ static void handle_start_codelet_body(struct fxt_ev_64 *ev, struct starpu_fxt_op
|
|
|
#endif
|
|
|
}
|
|
|
}
|
|
|
+#endif /* STARPU_ENABLE_PAJE_CODELET_DETAILS */
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+static void handle_codelet_details(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
|
|
|
+{
|
|
|
+#ifdef STARPU_ENABLE_PAJE_CODELET_DETAILS
|
|
|
+ int worker;
|
|
|
+ worker = find_worker_id(ev->param[5]);
|
|
|
|
|
|
+ unsigned sched_ctx = ev->param[1];
|
|
|
+ if (worker < 0) return;
|
|
|
+
|
|
|
+ char *prefix = options->file_prefix;
|
|
|
+
|
|
|
+ if (out_paje_file)
|
|
|
+ {
|
|
|
+ worker_set_detailed_state(last_codelet_start[worker], prefix, ev->param[5], last_codelet_symbol[worker], ev->param[2], ev->param[3], ev->param[4]);
|
|
|
+ if (sched_ctx != 0)
|
|
|
+ {
|
|
|
+#ifdef STARPU_HAVE_POTI
|
|
|
+ char container[STARPU_POTI_STR_LEN];
|
|
|
+ char ctx[6];
|
|
|
+ snprintf(ctx, sizeof(ctx), "Ctx%d", sched_ctx);
|
|
|
+ thread_container_alias(container, STARPU_POTI_STR_LEN, prefix, ev->param[5]);
|
|
|
+ poti_SetState(last_codelet_start[worker], container, ctx, last_codelet_symbol[worker]);
|
|
|
+#else
|
|
|
+ fprintf(out_paje_file, "20 %.9f %st%"PRIu64" Ctx%d %s %08lx %lu %016llx\n", last_codelet_start[worker], prefix, ev->param[2], sched_ctx, last_codelet_symbol[worker], (unsigned long) ev->param[2], (unsigned long) ev->param[3], (unsigned long long) ev->param[4]);
|
|
|
+#endif
|
|
|
+ }
|
|
|
+ }
|
|
|
+#endif /* STARPU_ENABLE_PAJE_CODELET_DETAILS */
|
|
|
}
|
|
|
|
|
|
static long dumped_codelets_count;
|
|
@@ -1524,6 +1567,9 @@ void starpu_fxt_parse_new_file(char *filename_in, struct starpu_fxt_options *opt
|
|
|
case _STARPU_FUT_START_CODELET_BODY:
|
|
|
handle_start_codelet_body(&ev, options);
|
|
|
break;
|
|
|
+ case _STARPU_FUT_CODELET_DETAILS:
|
|
|
+ handle_codelet_details(&ev, options);
|
|
|
+ break;
|
|
|
case _STARPU_FUT_END_CODELET_BODY:
|
|
|
handle_end_codelet_body(&ev, options);
|
|
|
break;
|