starpu_fxt.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010-2011, 2013, 2015-2016 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_counter;
  38. unsigned no_bus;
  39. unsigned ninputfiles;
  40. char *filenames[STARPU_FXT_MAX_FILES];
  41. char *out_paje_path;
  42. char *distrib_time_path;
  43. char *activity_path;
  44. char *dag_path;
  45. char *tasks_path;
  46. char *anim_path;
  47. char *states_path;
  48. char *file_prefix;
  49. uint64_t file_offset;
  50. int file_rank;
  51. char worker_names[STARPU_NMAXWORKERS][256];
  52. struct starpu_perfmodel_arch worker_archtypes[STARPU_NMAXWORKERS];
  53. int nworkers;
  54. struct starpu_fxt_codelet_event **dumped_codelets;
  55. long dumped_codelets_count;
  56. };
  57. void starpu_fxt_options_init(struct starpu_fxt_options *options);
  58. void starpu_fxt_generate_trace(struct starpu_fxt_options *options);
  59. void starpu_fxt_autostart_profiling(int autostart);
  60. void starpu_fxt_start_profiling(void);
  61. void starpu_fxt_stop_profiling(void);
  62. void starpu_fxt_write_data_trace(char *filename_in);
  63. void starpu_fxt_trace_user_event(unsigned long code);
  64. void starpu_fxt_trace_user_event_string(const char *s);
  65. #ifdef __cplusplus
  66. }
  67. #endif
  68. #endif /* __STARPU_FXT_H__ */