starpu_fxt.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010-2011, 2013 Université de Bordeaux 1
  4. * Copyright (C) 2010, 2011, 2013 Centre National de la Recherche Scientifique
  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]; /* name of the codelet */
  28. int workerid;
  29. enum starpu_perf_archtype archtype;
  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. /* In case we are going to gather multiple traces (eg in the case of
  46. * MPI processes), we may need to prefix the name of the containers. */
  47. char *file_prefix;
  48. uint64_t file_offset;
  49. int file_rank;
  50. /*
  51. * Output parameters
  52. */
  53. char worker_names[STARPU_NMAXWORKERS][256];
  54. enum starpu_perf_archtype worker_archtypes[STARPU_NMAXWORKERS];
  55. int nworkers;
  56. /* In case we want to dump the list of codelets to an external tool */
  57. struct starpu_fxt_codelet_event **dumped_codelets;
  58. long dumped_codelets_count;
  59. };
  60. void starpu_fxt_options_init(struct starpu_fxt_options *options);
  61. void starpu_fxt_generate_trace(struct starpu_fxt_options *options);
  62. void starpu_fxt_start_profiling(void);
  63. void starpu_fxt_stop_profiling(void);
  64. #ifdef __cplusplus
  65. }
  66. #endif
  67. #endif /* __STARPU_FXT_H__ */