Halide
halide_profiler_state Struct Reference

The global state of the profiler. More...

#include <HalideRuntime.h>

Public Attributes

struct halide_mutex lock
 Guards access to the fields below. More...
 
int sleep_time
 The amount of time the profiler thread sleeps between samples in milliseconds. More...
 
int first_free_id
 An internal id used for bookkeeping. More...
 
int current_func
 The id of the current running Func. More...
 
int active_threads
 The number of threads currently doing work. More...
 
struct halide_profiler_pipeline_stats * pipelines
 A linked list of stats gathered for each pipeline. More...
 
void(* get_remote_profiler_state )(int *func, int *active_workers)
 Retrieve remote profiler state. More...
 
struct halide_thread * sampling_thread
 Sampling thread reference to be joined at shutdown. More...
 

Detailed Description

The global state of the profiler.

Definition at line 1852 of file HalideRuntime.h.

Member Data Documentation

◆ lock

struct halide_mutex halide_profiler_state::lock

Guards access to the fields below.

If not locked, the sampling profiler thread is free to modify things below (including reordering the linked list of pipeline stats).

Definition at line 1856 of file HalideRuntime.h.

◆ sleep_time

int halide_profiler_state::sleep_time

The amount of time the profiler thread sleeps between samples in milliseconds.

Defaults to 1

Definition at line 1860 of file HalideRuntime.h.

◆ first_free_id

int halide_profiler_state::first_free_id

An internal id used for bookkeeping.

Definition at line 1863 of file HalideRuntime.h.

◆ current_func

int halide_profiler_state::current_func

The id of the current running Func.

Set by the pipeline, read periodically by the profiler thread.

Definition at line 1867 of file HalideRuntime.h.

◆ active_threads

int halide_profiler_state::active_threads

The number of threads currently doing work.

Definition at line 1870 of file HalideRuntime.h.

◆ pipelines

struct halide_profiler_pipeline_stats* halide_profiler_state::pipelines

A linked list of stats gathered for each pipeline.

Definition at line 1873 of file HalideRuntime.h.

◆ get_remote_profiler_state

void(* halide_profiler_state::get_remote_profiler_state) (int *func, int *active_workers)

Retrieve remote profiler state.

Used so that the sampling profiler can follow along with execution that occurs elsewhere, e.g. on a DSP. If null, it reads from the int above instead.

Definition at line 1878 of file HalideRuntime.h.

◆ sampling_thread

struct halide_thread* halide_profiler_state::sampling_thread

Sampling thread reference to be joined at shutdown.

Definition at line 1881 of file HalideRuntime.h.


The documentation for this struct was generated from the following file: