profiling.doxy 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux 1
  4. * Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
  5. * Copyright (C) 2011, 2012 Institut National de Recherche en Informatique et Automatique
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \defgroup API_Profiling Profiling
  9. \struct starpu_profiling_task_info
  10. \ingroup API_Profiling
  11. This structure contains information about the execution of a
  12. task. It is accessible from the field starpu_task::profiling_info if
  13. profiling was enabled.
  14. \var starpu_profiling_task_info::submit_time
  15. Date of task submission (relative to the initialization of StarPU).
  16. \var starpu_profiling_task_info::push_start_time
  17. Time when the task was submitted to the scheduler.
  18. \var starpu_profiling_task_info::push_end_time
  19. Time when the scheduler finished with the task submission.
  20. \var starpu_profiling_task_info::pop_start_time
  21. Time when the scheduler started to be requested for a task, and eventually gave that task.
  22. \var starpu_profiling_task_info::pop_end_time
  23. Time when the scheduler finished providing the task for execution.
  24. \var starpu_profiling_task_info::acquire_data_start_time
  25. Time when the worker started fetching input data.
  26. \var starpu_profiling_task_info::acquire_data_end_time
  27. Time when the worker finished fetching input data.
  28. \var starpu_profiling_task_info::start_time
  29. Date of task execution beginning (relative to the initialization of StarPU).
  30. \var starpu_profiling_task_info::end_time
  31. Date of task execution termination (relative to the initialization of StarPU).
  32. \var starpu_profiling_task_info::release_data_start_time
  33. Time when the worker started releasing data.
  34. \var starpu_profiling_task_info::release_data_end_time
  35. Time when the worker finished releasing data.
  36. \var starpu_profiling_task_info::callback_start_time
  37. Time when the worker started the application callback for the task.
  38. \var starpu_profiling_task_info::callback_end_time
  39. Time when the worker finished the application callback for the task.
  40. \var starpu_profiling_task_info::workerid
  41. Identifier of the worker which has executed the task.
  42. \var starpu_profiling_task_info::used_cycles
  43. Number of cycles used by the task, only available in the MoviSim
  44. \var starpu_profiling_task_info::stall_cycles
  45. Number of cycles stalled within the task, only available in the MoviSim
  46. \var starpu_profiling_task_info::power_consumed
  47. Power consumed by the task, only available in the MoviSim
  48. \struct starpu_profiling_worker_info
  49. This structure contains the profiling information associated to
  50. a worker. The timing is provided since the previous call to
  51. starpu_profiling_worker_get_info()
  52. \ingroup API_Profiling
  53. \var starpu_profiling_worker_info::start_time
  54. Starting date for the reported profiling measurements.
  55. \var starpu_profiling_worker_info::total_time
  56. Duration of the profiling measurement interval.
  57. \var starpu_profiling_worker_info::executing_time
  58. Time spent by the worker to execute tasks during the profiling measurement interval.
  59. \var starpu_profiling_worker_info::sleeping_time
  60. Time spent idling by the worker during the profiling measurement interval.
  61. \var starpu_profiling_worker_info::executed_tasks
  62. Number of tasks executed by the worker during the profiling measurement interval.
  63. \var starpu_profiling_worker_info::used_cycles
  64. Number of cycles used by the worker, only available in the MoviSim
  65. \var starpu_profiling_worker_info::stall_cycles
  66. Number of cycles stalled within the worker, only available in the MoviSim
  67. \var starpu_profiling_worker_info::power_consumed
  68. Power consumed by the worker, only available in the MoviSim
  69. \struct starpu_profiling_bus_info
  70. todo
  71. \ingroup API_Profiling
  72. \var starpu_profiling_bus_info::start_time
  73. Time of bus profiling startup.
  74. \var starpu_profiling_bus_info::total_time
  75. Total time of bus profiling.
  76. \var starpu_profiling_bus_info::transferred_bytes
  77. Number of bytes transferred during profiling.
  78. \var starpu_profiling_bus_info::transfer_count
  79. Number of transfers during profiling.
  80. \fn int starpu_profiling_status_set(int status)
  81. \ingroup API_Profiling
  82. This function sets the profiling status. Profiling is activated
  83. by passing STARPU_PROFILING_ENABLE in status. Passing
  84. STARPU_PROFILING_DISABLE disables profiling. Calling this function
  85. resets all profiling measurements. When profiling is enabled, the
  86. field starpu_task::profiling_info points to a valid structure
  87. starpu_profiling_task_info containing information about the execution
  88. of the task. Negative return values indicate an error, otherwise the
  89. previous status is returned.
  90. \fn int starpu_profiling_status_get(void)
  91. \ingroup API_Profiling
  92. Return the current profiling status or a negative value in case
  93. there was an error.
  94. \fn void starpu_profiling_set_id(int new_id)
  95. \ingroup API_Profiling
  96. This function sets the ID used for profiling trace filename. It
  97. needs to be called before starpu_init().
  98. \fn int starpu_profiling_worker_get_info(int workerid, struct starpu_profiling_worker_info *worker_info)
  99. \ingroup API_Profiling
  100. Get the profiling info associated to the worker identified by
  101. \p workerid, and reset the profiling measurements. If the argument \p
  102. worker_info is NULL, only reset the counters associated to worker
  103. \p workerid. Upon successful completion, this function returns 0.
  104. Otherwise, a negative value is returned.
  105. \fn int starpu_bus_get_profiling_info(int busid, struct starpu_profiling_bus_info *bus_info)
  106. \ingroup API_Profiling
  107. todo
  108. \fn int starpu_bus_get_count(void)
  109. \ingroup API_Profiling
  110. Return the number of buses in the machine
  111. \fn int starpu_bus_get_id(int src, int dst)
  112. \ingroup API_Profiling
  113. Return the identifier of the bus between \p src and \p dst
  114. \fn int starpu_bus_get_src(int busid)
  115. \ingroup API_Profiling
  116. Return the source point of bus \p busid
  117. \fn int starpu_bus_get_dst(int busid)
  118. \ingroup API_Profiling
  119. Return the destination point of bus \p busid
  120. \fn double starpu_timing_timespec_delay_us(struct timespec *start, struct timespec *end)
  121. \ingroup API_Profiling
  122. Returns the time elapsed between \p start and \p end in microseconds.
  123. \fn double starpu_timing_timespec_to_us(struct timespec *ts)
  124. \ingroup API_Profiling
  125. Converts the given timespec \p ts into microseconds
  126. \fn void starpu_profiling_bus_helper_display_summary(void)
  127. \ingroup API_Profiling
  128. Displays statistics about the bus on stderr. if the environment
  129. variable STARPU_BUS_STATS is defined. The function is called
  130. automatically by starpu_shutdown().
  131. \fn void starpu_profiling_worker_helper_display_summary(void)
  132. \ingroup API_Profiling
  133. Displays statistics about the workers on stderr if the
  134. environment variable STARPU_WORKER_STATS is defined. The function is
  135. called automatically by starpu_shutdown().
  136. \fn void starpu_data_display_memory_stats()
  137. \ingroup API_Profiling
  138. Display statistics about the current data handles registered
  139. within StarPU. StarPU must have been configured with the option
  140. <c>--enable-memory-stats</c> (see \ref Memory_feedback).
  141. */