瀏覽代碼

Add -no-events option to starpu_fxt_tool

Samuel Thibault 8 年之前
父節點
當前提交
59b607325d
共有 4 個文件被更改,包括 18 次插入4 次删除
  1. 1 0
      ChangeLog
  2. 1 0
      include/starpu_fxt.h
  3. 8 4
      src/debug/traces/starpu_fxt.c
  4. 8 0
      tools/starpu_fxt_tool.c

+ 1 - 0
ChangeLog

@@ -56,6 +56,7 @@ StarPU 1.2.2 (svn revision xxx)
 New features:
   * Add starpu_data_acquire_try and starpu_data_acquire_on_node_try.
   * Add NVCC_CC environment variable.
+  * Add -no-foo options to starpu_fxt_tool to make traces lighter
 
 StarPU 1.2.1 (svn revision 20299)
 ==============================================

+ 1 - 0
include/starpu_fxt.h

@@ -40,6 +40,7 @@ struct starpu_fxt_codelet_event
 struct starpu_fxt_options
 {
 	unsigned per_task_colour;
+	unsigned no_events;
 	unsigned no_counter;
 	unsigned no_bus;
 	unsigned no_flops;

+ 8 - 4
src/debug/traces/starpu_fxt.c

@@ -1857,7 +1857,7 @@ static void handle_data_register(struct fxt_ev_64 *ev, struct starpu_fxt_options
 	unsigned long handle = ev->param[0];
 	char *prefix = options->file_prefix;
 
-	if (out_paje_file)
+	if (out_paje_file && !options->no_events)
 	{
 #ifdef STARPU_HAVE_POTI
 		char paje_value[STARPU_POTI_STR_LEN], container[STARPU_POTI_STR_LEN];
@@ -3218,7 +3218,8 @@ void _starpu_fxt_parse_new_file(char *filename_in, struct starpu_fxt_options *op
 				break;
 
 			case _STARPU_FUT_USER_EVENT:
-				handle_user_event(&ev, options);
+				if (!options->no_events)
+					handle_user_event(&ev, options);
 				break;
 
 			case _STARPU_MPI_FUT_START:
@@ -3317,11 +3318,13 @@ void _starpu_fxt_parse_new_file(char *filename_in, struct starpu_fxt_options *op
 				break;
 
 			case _STARPU_FUT_EVENT:
-				handle_event(&ev, options);
+				if (!options->no_events)
+					handle_event(&ev, options);
 				break;
 
 			case _STARPU_FUT_THREAD_EVENT:
-				handle_thread_event(&ev, options);
+				if (!options->no_events)
+					handle_thread_event(&ev, options);
 				break;
 
 			case _STARPU_FUT_LOCKING_MUTEX:
@@ -3488,6 +3491,7 @@ void _starpu_fxt_parse_new_file(char *filename_in, struct starpu_fxt_options *op
 void starpu_fxt_options_init(struct starpu_fxt_options *options)
 {
 	options->per_task_colour = 0;
+	options->no_events = 0;
 	options->no_counter = 0;
 	options->no_bus = 0;
 	options->no_flops = 0;

+ 8 - 0
tools/starpu_fxt_tool.c

@@ -34,6 +34,7 @@ static void usage()
 	fprintf(stderr, "                       times for MPI execution case\n");
         fprintf(stderr, "   -o <output file>    specify the output file\n");
         fprintf(stderr, "   -c                  use a different colour for every type of task\n");
+	fprintf(stderr, "   -no-events          do not show events\n");
 	fprintf(stderr, "   -no-counter         do not show scheduler counters\n");
 	fprintf(stderr, "   -no-bus             do not show PCI bus transfers\n");
 	fprintf(stderr, "   -no-flops           do not show flops\n");
@@ -78,6 +79,13 @@ static int parse_args(int argc, char **argv)
 			continue;
 		}
 
+		if (strcmp(argv[i], "-no-events") == 0)
+		{
+			options.no_events = 1;
+			reading_input_filenames = 0;
+			continue;
+		}
+
 		if (strcmp(argv[i], "-no-counter") == 0)
 		{
 			options.no_counter = 1;