starpu_fxt.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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,2017,2018 CNRS
  6. * Copyright (C) 2010-2011,2013-2018 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. unsigned no_acquire;
  46. unsigned memory_states;
  47. unsigned internal;
  48. unsigned label_deps;
  49. char *filenames[STARPU_FXT_MAX_FILES];
  50. char *out_paje_path;
  51. char *distrib_time_path;
  52. char *activity_path;
  53. char *dag_path;
  54. char *tasks_path;
  55. char *data_path;
  56. char *anim_path;
  57. char *states_path;
  58. char *file_prefix;
  59. uint64_t file_offset;
  60. int file_rank;
  61. char worker_names[STARPU_NMAXWORKERS][256];
  62. struct starpu_perfmodel_arch worker_archtypes[STARPU_NMAXWORKERS];
  63. int nworkers;
  64. struct starpu_fxt_codelet_event **dumped_codelets;
  65. long dumped_codelets_count;
  66. };
  67. void starpu_fxt_options_init(struct starpu_fxt_options *options);
  68. void starpu_fxt_generate_trace(struct starpu_fxt_options *options);
  69. void starpu_fxt_autostart_profiling(int autostart);
  70. void starpu_fxt_start_profiling(void);
  71. void starpu_fxt_stop_profiling(void);
  72. void starpu_fxt_write_data_trace(char *filename_in);
  73. void starpu_fxt_trace_user_event(unsigned long code);
  74. void starpu_fxt_trace_user_event_string(const char *s);
  75. #ifdef __cplusplus
  76. }
  77. #endif
  78. #endif /* __STARPU_FXT_H__ */