Browse Source

Use short aliases for memory states, add wontuse events

Samuel Thibault 7 years ago
parent
commit
8598e3a708
2 changed files with 30 additions and 5 deletions
  1. 25 3
      src/debug/traces/starpu_fxt.c
  2. 5 2
      src/debug/traces/starpu_paje.c

+ 25 - 3
src/debug/traces/starpu_fxt.c

@@ -2165,6 +2165,26 @@ static void handle_data_wont_use(struct fxt_ev_64 *ev, struct starpu_fxt_options
 	fprintf(tasks_file, "\n");
 }
 
+static void handle_data_doing_wont_use(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
+{
+	unsigned long handle = ev->param[0];
+	char *prefix = options->file_prefix;
+	unsigned node = STARPU_MAIN_RAM;
+	const char *event = "WU";
+
+	if (out_paje_file)
+	{
+#ifdef STARPU_HAVE_POTI
+		char paje_value[STARPU_POTI_STR_LEN], memnode_container[STARPU_POTI_STR_LEN];
+		memmanager_container_alias(memnode_container, STARPU_POTI_STR_LEN, prefix, node);
+		snprintf(paje_value, sizeof(paje_value), "%lx", handle);
+		poti_NewEvent(get_event_time_stamp(ev, options), memnode_container, event, paje_value);
+#else
+		fprintf(out_paje_file, "9	%.9f	%s	%smm%u	%lx\n", get_event_time_stamp(ev, options), event, prefix, node, handle);
+#endif
+	}
+}
+
 static void handle_mpi_data_set_rank(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
 {
 	unsigned long handle = ev->param[0];
@@ -3489,15 +3509,15 @@ void _starpu_fxt_parse_new_file(char *filename_in, struct starpu_fxt_options *op
 
 			case _STARPU_FUT_DATA_STATE_INVALID:
 				if (options->memory_states)
-					handle_data_state(&ev, options, "invalid");
+					handle_data_state(&ev, options, "SI");
 				break;
 			case _STARPU_FUT_DATA_STATE_OWNER:
 				if (options->memory_states)
-					handle_data_state(&ev, options, "owner");
+					handle_data_state(&ev, options, "SO");
 				break;
 			case _STARPU_FUT_DATA_STATE_SHARED:
 				if (options->memory_states)
-					handle_data_state(&ev, options, "shared");
+					handle_data_state(&ev, options, "SS");
 				break;
 
 			case _STARPU_FUT_DATA_COPY:
@@ -3521,6 +3541,8 @@ void _starpu_fxt_parse_new_file(char *filename_in, struct starpu_fxt_options *op
 				break;
 
 			case _STARPU_FUT_DATA_DOING_WONT_USE:
+				if (options->memory_states)
+					handle_data_doing_wont_use(&ev, options);
 				break;
 
 			case _STARPU_FUT_START_DRIVER_COPY:

+ 5 - 2
src/debug/traces/starpu_paje.c

@@ -3,7 +3,7 @@
  * Copyright (C) 2011-2014,2016-2017                      Inria
  * Copyright (C) 2012,2014,2017,2018                      CNRS
  * Copyright (C) 2017                                     Universidade Federal do Rio Grande do Sul (UFRGS)
- * Copyright (C) 2010-2017                                Université de Bordeaux
+ * Copyright (C) 2010-2018                                Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -214,7 +214,10 @@ void _starpu_fxt_write_paje_header(FILE *file STARPU_ATTRIBUTE_UNUSED)
 	poti_DefineEventType("unregister", "P", "data unregistration");
 
 	/* Types for the memory node */
-	poti_DefineEventType("invalidate", "Mm", "data invalidation");
+	poti_DefineEventType("SI", "Mm", "data state invalid");
+	poti_DefineEventType("SS", "Mm", "data state shared");
+	poti_DefineEventType("SS", "Mm", "data state owner");
+	poti_DefineEventType("WU", "Mm", "data wont use");
 	poti_DefineVariableType("use", "Mm", "Used (MB)", "0 0 0");
 	poti_DefineVariableType("bwi_mm", "Mm", "Bandwidth In (MB/s)", "0 0 0");
 	poti_DefineVariableType("bwo_mm", "Mm", "Bandwidth Out (MB/s)", "0 0 0");