Loading...
Searching...
No Matches
Profiling

## Data Structures

struct | starpu_profiling_task_info
struct | starpu_profiling_worker_info
struct | starpu_profiling_bus_info

## Macros

#define | STARPU_PROFILING_DISABLE
#define | STARPU_PROFILING_ENABLE
#define | STARPU_NS_PER_S
#define | starpu_timespec_cmp(a, b, CMP)

## Functions

void | starpu_profiling_init (void)
void | starpu_profiling_set_id (int new_id)
int | starpu_profiling_status_set (int status)
int | starpu_profiling_status_get (void)
int | starpu_profiling_worker_get_info (int workerid, struct starpu_profiling_worker_info *worker_info)
int | starpu_bus_get_count (void)
int | starpu_bus_get_id (int src, int dst)
int | starpu_bus_get_src (int busid)
int | starpu_bus_get_dst (int busid)
void | starpu_bus_set_direct (int busid, int direct)
int | starpu_bus_get_direct (int busid)
void | starpu_bus_set_ngpus (int busid, int ngpus)
int | starpu_bus_get_ngpus (int busid)
int | starpu_bus_get_profiling_info (int busid, struct starpu_profiling_bus_info *bus_info)
static __starpu_inline void | starpu_timespec_clear (struct timespec *tsp)
static __starpu_inline void | starpu_timespec_add (struct timespec *a, struct timespec *b, struct timespec *result)
static __starpu_inline void | starpu_timespec_accumulate (struct timespec *result, struct timespec *a)
static __starpu_inline void | starpu_timespec_sub (const struct timespec *a, const struct timespec *b, struct timespec *result)
double | starpu_timing_timespec_delay_us (struct timespec *start, struct timespec *end)
double | starpu_timing_timespec_to_us (struct timespec *ts)
void | starpu_profiling_bus_helper_display_summary (void)
void | starpu_profiling_worker_helper_display_summary (void)
void | starpu_data_display_memory_stats (void)

## Detailed Description

## Data Structure Documentation

## starpu_profiling_task_info

struct starpu_profiling_task_info

Information about the execution of a task. It is accessible from the field starpu_task::profiling_info if profiling was enabled.

Data Fields
struct timespec | submit_time | Date of task submission (relative to the initialization of StarPU).
struct timespec | push_start_time | Time when the task was submitted to the scheduler.
struct timespec | push_end_time | Time when the scheduler finished with the task submission.
struct timespec | pop_start_time | Time when the scheduler started to be requested for a task, and eventually gave that task.
struct timespec | pop_end_time | Time when the scheduler finished providing the task for execution.
struct timespec | acquire_data_start_time | Time when the worker started fetching input data.
struct timespec | acquire_data_end_time | Time when the worker finished fetching input data.
struct timespec | start_time | Date of task execution beginning (relative to the initialization of StarPU).
struct timespec | end_time | Date of task execution termination (relative to the initialization of StarPU).
struct timespec | release_data_start_time | Time when the worker started releasing data.
struct timespec | release_data_end_time | Time when the worker finished releasing data.
struct timespec | callback_start_time | Time when the worker started the application callback for the task.
struct timespec | callback_end_time | Time when the worker finished the application callback for the task.
int | workerid | Identifier of the worker which has executed the task.
uint64_t | used_cycles | Number of cycles used by the task, only available in the MoviSim
uint64_t | stall_cycles | Number of cycles stalled within the task, only available in the MoviSim
double | energy_consumed | Energy consumed by the task, in Joules

## starpu_profiling_worker_info

struct starpu_profiling_worker_info

Profiling information associated to a worker. The timing is provided since the previous call to starpu_profiling_worker_get_info().

The executing_time, callback_time, waiting_time, sleeping_time, and scheduling_time are exclusive to each other, i.e. they can be added up, their sum is smaller than total_time. The difference between total_time and the sum is the uncategorized runtime overhead.

Data Fields
struct timespec | start_time | Starting date for the reported profiling measurements.
struct timespec | total_time | Duration of the profiling measurement interval.
struct timespec | executing_time | Time spent by the worker to execute tasks during the profiling measurement interval.
struct timespec | callback_time | Time spent by the worker to execute callbacks, while not executing a task, during the profiling measurement interval.
struct timespec | waiting_time | Time spent by the worker waiting for a data transfer to finish, while not executing a task or a callback, during the profiling measurement interval.
struct timespec | sleeping_time | Time spent idling by the worker because no task were available, and not executing a task or a callback or waiting for a data transfer to finish, during the profiling measurement interval.
struct timespec | scheduling_time | Time spent by the worker scheduling tasks, while not executing a task or a callback or waiting for a data transfer to finish, and there are tasks to be scheduled, during the profiling measurement interval.
struct timespec | all_executing_time | Time spent by the worker to execute tasks during the profiling measurement interval. Normally always equal to executing_time.
struct timespec | all_callback_time | Time spent by the worker to execute callbacks during the profiling measurement interval. Normally always greater than callback_time.
struct timespec | all_waiting_time | Time spent by the worker waiting for a data transfer to finish during the profiling measurement interval. Normally always greater than waiting_time.
struct timespec | all_sleeping_time | Time spent idling by the worker because no task were available during the profiling measurement interval. Normally always greater than sleeping_time.
struct timespec | all_scheduling_time | Time spent by the worker scheduling tasks during the profiling measurement interval. Normally always greater than scheduling_time.
int | executed_tasks | Number of tasks executed by the worker during the profiling measurement interval.
uint64_t | used_cycles | Number of cycles used by the worker, only available in the MoviSim
uint64_t | stall_cycles | Number of cycles stalled within the worker, only available in the MoviSim
double | energy_consumed | Energy consumed by the worker, in Joules
double | flops |

## starpu_profiling_bus_info

struct starpu_profiling_bus_info

todo

Data Fields
struct timespec | start_time | Time of bus profiling startup.
struct timespec | total_time | Total time of bus profiling.
int long long | transferred_bytes | Number of bytes transferred during profiling.
int | transfer_count | Number of transfers during profiling.

## Macro Definition Documentation

## STARPU_PROFILING_DISABLE

#define STARPU_PROFILING_DISABLE

Used when calling the function starpu_profiling_status_set() to disable profiling.

## STARPU_PROFILING_ENABLE

#define STARPU_PROFILING_ENABLE

Used when calling the function starpu_profiling_status_set() to enable profiling.

## Function Documentation

## starpu_profiling_init()

void starpu_profiling_init | ( | void |  | ) |

Reset performance counters and enable profiling if the environment variable STARPU_PROFILING is set to a positive value. See EnablingOn-linePerformanceMonitoring for more details.

## starpu_profiling_set_id()

void starpu_profiling_set_id | ( | int | new_id | ) |

Set the ID used for profiling trace filename. Has to be called before starpu_init(). See TraceMpi for more details.

## starpu_profiling_status_set()

int starpu_profiling_status_set | ( | int | status | ) |

Set the profiling status. Profiling is activated by passing STARPU_PROFILING_ENABLE in `status`. Passing STARPU_PROFILING_DISABLE disables profiling. Calling this function resets all profiling measurements. When profiling is enabled, the field starpu_task::profiling_info points to a valid structure starpu_profiling_task_info containing information about the execution of the task. Negative return values indicate an error, otherwise the previous status is returned. See EnablingOn-linePerformanceMonitoring for more details.

## starpu_profiling_status_get()

int starpu_profiling_status_get | ( | void |  | ) |

Return the current profiling status or a negative value in case there was an error. See EnablingOn-linePerformanceMonitoring for more details.

## starpu_profiling_worker_get_info()

int starpu_profiling_worker_get_info | ( | int | workerid,
|  | struct starpu_profiling_worker_info * | worker_info
| ) |  |

Get the profiling info associated to the worker identified by `workerid`, and reset the profiling measurements. If the argument `worker_info` is `NULL`, only reset the counters associated to worker `workerid`. Upon successful completion, this function returns 0. Otherwise, a negative value is returned. See Per-workerFeedback for more details.

## starpu_bus_get_count()

int starpu_bus_get_count | ( | void |  | ) |

Return the number of buses in the machine. See Hardware Topology for more details.

## starpu_bus_get_id()

int starpu_bus_get_id | ( | int | src,
|  | int | dst
| ) |  |

Return the identifier of the bus between `src` and `dst`. See Hardware Topology for more details.

## starpu_bus_get_src()

int starpu_bus_get_src | ( | int | busid | ) |

Return the source point of bus `busid`. See Hardware Topology for more details.

## starpu_bus_get_dst()

int starpu_bus_get_dst | ( | int | busid | ) |

Return the destination point of bus `busid`. See Hardware Topology for more details.

## starpu_bus_set_direct()

void starpu_bus_set_direct | ( | int | busid,
|  | int | direct
| ) |  |

See Hardware Topology for more details.

## starpu_bus_get_direct()

int starpu_bus_get_direct | ( | int | busid | ) |

See Hardware Topology for more details.

## starpu_bus_set_ngpus()

void starpu_bus_set_ngpus | ( | int | busid,
|  | int | ngpus
| ) |  |

See Hardware Topology for more details.

## starpu_bus_get_ngpus()

int starpu_bus_get_ngpus | ( | int | busid | ) |

See Hardware Topology for more details.

## starpu_bus_get_profiling_info()

int starpu_bus_get_profiling_info | ( | int | busid,
|  | struct starpu_profiling_bus_info * | bus_info
| ) |  |

See _starpu_profiling_bus_helper_display_summary in src/profiling/profiling_helpers.c for a usage example. Note that calling starpu_bus_get_profiling_info() resets the counters to zero. See FeedBackFigures for more details.

## starpu_timing_timespec_delay_us()

double starpu_timing_timespec_delay_us | ( | struct timespec * | start,
|  | struct timespec * | end
| ) |  |

Return the time elapsed between `start` and `end` in microseconds. See Per-taskFeedback for more details.

## starpu_timing_timespec_to_us()

double starpu_timing_timespec_to_us | ( | struct timespec * | ts | ) |

Convert the given timespec `ts` into microseconds. See Per-taskFeedback for more details.

## starpu_profiling_bus_helper_display_summary()

void starpu_profiling_bus_helper_display_summary | ( | void |  | ) |

Display statistics about the bus on `stderr`. if the environment variable STARPU_BUS_STATS is defined. The function is called automatically by starpu_shutdown(). See DataStatistics for more details.

## starpu_profiling_worker_helper_display_summary()

void starpu_profiling_worker_helper_display_summary | ( | void |  | ) |

Display statistic about the workers on `stderr` if the environment variable STARPU_WORKER_STATS is defined. The function is called automatically by starpu_shutdown(). See DataStatistics for more details.

## starpu_data_display_memory_stats()

void starpu_data_display_memory_stats | ( | void |  | ) |

Display statistics about the current data handles registered within StarPU. StarPU must have been configured with the configure option --enable-memory-stats (see MemoryFeedback). See MemoryFeedback for more details.