starpu_fxt.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2012-2013,2016 Inria
  4. * Copyright (C) 2013 Joris Pablo
  5. * Copyright (C) 2010-2015 CNRS
  6. * Copyright (C) 2010-2011,2013-2017 Université de Bordeaux
  7. *
  8. * StarPU is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU Lesser General Public License as published by
  10. * the Free Software Foundation; either version 2.1 of the License, or (at
  11. * your option) any later version.
  12. *
  13. * StarPU is distributed in the hope that it will be useful, but
  14. * WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. *
  17. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  18. */
  19. #ifndef __STARPU_FXT_H__
  20. #define __STARPU_FXT_H__
  21. #include <starpu_perfmodel.h>
  22. #ifdef __cplusplus
  23. extern "C"
  24. {
  25. #endif
  26. #define STARPU_FXT_MAX_FILES 64
  27. struct starpu_fxt_codelet_event
  28. {
  29. char symbol[256];
  30. int workerid;
  31. char perfmodel_archname[256];
  32. uint32_t hash;
  33. size_t size;
  34. float time;
  35. };
  36. struct starpu_fxt_options
  37. {
  38. unsigned per_task_colour;
  39. unsigned no_events;
  40. unsigned no_counter;
  41. unsigned no_bus;
  42. unsigned no_flops;
  43. unsigned ninputfiles;
  44. unsigned no_smooth;
  45. char *filenames[STARPU_FXT_MAX_FILES];
  46. char *out_paje_path;
  47. char *distrib_time_path;
  48. char *activity_path;
  49. char *dag_path;
  50. char *tasks_path;
  51. char *data_path;
  52. char *anim_path;
  53. char *states_path;
  54. char *file_prefix;
  55. uint64_t file_offset;
  56. int file_rank;
  57. char worker_names[STARPU_NMAXWORKERS][256];
  58. struct starpu_perfmodel_arch worker_archtypes[STARPU_NMAXWORKERS];
  59. int nworkers;
  60. struct starpu_fxt_codelet_event **dumped_codelets;
  61. long dumped_codelets_count;
  62. };
  63. void starpu_fxt_options_init(struct starpu_fxt_options *options);
  64. void starpu_fxt_generate_trace(struct starpu_fxt_options *options);
  65. void starpu_fxt_autostart_profiling(int autostart);
  66. void starpu_fxt_start_profiling(void);
  67. void starpu_fxt_stop_profiling(void);
  68. void starpu_fxt_write_data_trace(char *filename_in);
  69. void starpu_fxt_trace_user_event(unsigned long code);
  70. void starpu_fxt_trace_user_event_string(const char *s);
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #endif /* __STARPU_FXT_H__ */