starpu_fxt.h 2.4 KB

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