xine-lib: xine-lib-1.2.13/src/xine-utils/monitor.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions | Variables
monitor.c File Reference
`#include <stdio.h>`
`#include <pthread.h>`
`#include <sys/time.h>`
`#include <xine/xineutils.h>`

## Data Structures
struct | xine_profiler_t

## Macros
#define | MAX_ID 10

## Functions
void | xine_profiler_init ()
int | xine_profiler_allocate_slot (const char *label)
void | xine_profiler_start_count (int id)
void | xine_profiler_stop_count (int id)
void | xine_profiler_print_results (void)

## Variables
static xine_profiler_t | profiler [10]
static pthread_mutex_t | profiler_lock = PTHREAD_MUTEX_INITIALIZER

## Macro Definition Documentation

## ◆ MAX_ID

#define MAX_ID 10

Referenced by xine_profiler_allocate_slot(), xine_profiler_print_results(), xine_profiler_start_count(), and xine_profiler_stop_count().

## Function Documentation

## ◆ xine_profiler_allocate_slot()

int xine_profiler_allocate_slot | ( | const char * | label | ) |

References MAX_ID, NULL, xine_profiler_t::p_label, profiler, and profiler_lock.

Referenced by audio_decoder_loop(), video_decoder_loop(), and yuv2rgb_configure().

## ◆ xine_profiler_init()

void xine_profiler_init | ( | void |  | ) |

References profiler, and profiler_lock.

## ◆ xine_profiler_print_results()

void xine_profiler_print_results | ( | void |  | ) |

References MAX_ID, NULL, profiler, rdtsc(), and xine_usec_sleep().

## ◆ xine_profiler_start_count()

void xine_profiler_start_count | ( | int | id | ) |

References MAX_ID, xine_profiler_t::p_start, profiler, and rdtsc().

Referenced by audio_decoder_loop(), scale_line_11_12(), scale_line_11_24(), scale_line_15_16(), scale_line_1_1(), scale_line_1_2(), scale_line_2_3(), scale_line_3_4(), scale_line_45_53(), scale_line_45_64(), scale_line_5_4(), scale_line_5_8(), scale_line_9_16(), scale_line_gen(), and video_decoder_loop().

## ◆ xine_profiler_stop_count()

void xine_profiler_stop_count | ( | int | id | ) |

References MAX_ID, xine_profiler_t::p_calls, xine_profiler_t::p_start, xine_profiler_t::p_times, profiler, and rdtsc().

Referenced by audio_decoder_loop(), scale_line_11_12(), scale_line_11_24(), scale_line_15_16(), scale_line_1_1(), scale_line_1_2(), scale_line_2_3(), scale_line_3_4(), scale_line_45_53(), scale_line_45_64(), scale_line_5_4(), scale_line_5_8(), scale_line_9_16(), scale_line_gen(), and video_decoder_loop().

## Variable Documentation

## ◆ profiler

xine_profiler_t profiler[10]
| static

Referenced by xine_profiler_allocate_slot(), xine_profiler_init(), xine_profiler_print_results(), xine_profiler_start_count(), and xine_profiler_stop_count().

## ◆ profiler_lock

pthread_mutex_t profiler_lock = PTHREAD_MUTEX_INITIALIZER
| static

Referenced by xine_profiler_allocate_slot(), and xine_profiler_init().