starpu_fxt.h 2.1 KB

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