Open Broadcaster Software
Free, open source software for live streaming and recording
profiler.h File Reference

Go to the source code of this file.

Data Structures

struct  profiler_time_entry
 

Macros

#define PRINTFATTR(f, a)   __attribute__((__format__(__printf__, f, a)))
 

Typedefs

typedef struct profiler_snapshot profiler_snapshot_t
 
typedef struct profiler_snapshot_entry profiler_snapshot_entry_t
 
typedef struct profiler_time_entry profiler_time_entry_t
 
typedef struct profiler_name_store profiler_name_store_t
 
typedef bool(* profiler_entry_enum_func) (void *context, profiler_snapshot_entry_t *entry)
 
typedef bool(* profiler_name_filter_func) (void *data, const char *name, bool *remove)
 

Functions

EXPORT void profile_register_root (const char *name, uint64_t expected_time_between_calls)
 
EXPORT void profile_start (const char *name)
 
EXPORT void profile_end (const char *name)
 
EXPORT void profile_reenable_thread (void)
 
EXPORT void profiler_start (void)
 
EXPORT void profiler_stop (void)
 
EXPORT void profiler_print (profiler_snapshot_t *snap)
 
EXPORT void profiler_print_time_between_calls (profiler_snapshot_t *snap)
 
EXPORT void profiler_free (void)
 
EXPORT profiler_name_store_tprofiler_name_store_create (void)
 
EXPORT void profiler_name_store_free (profiler_name_store_t *store)
 
const EXPORT char * profile_store_name (profiler_name_store_t *store, const char *format,...)
 
typedef DARRAY (profiler_time_entry_t) profiler_time_entries_t
 
EXPORT profiler_snapshot_tprofile_snapshot_create (void)
 
EXPORT void profile_snapshot_free (profiler_snapshot_t *snap)
 
EXPORT bool profiler_snapshot_dump_csv (const profiler_snapshot_t *snap, const char *filename)
 
EXPORT bool profiler_snapshot_dump_csv_gz (const profiler_snapshot_t *snap, const char *filename)
 
EXPORT size_t profiler_snapshot_num_roots (profiler_snapshot_t *snap)
 
EXPORT void profiler_snapshot_enumerate_roots (profiler_snapshot_t *snap, profiler_entry_enum_func func, void *context)
 
EXPORT void profiler_snapshot_filter_roots (profiler_snapshot_t *snap, profiler_name_filter_func func, void *data)
 
EXPORT size_t profiler_snapshot_num_children (profiler_snapshot_entry_t *entry)
 
EXPORT void profiler_snapshot_enumerate_children (profiler_snapshot_entry_t *entry, profiler_entry_enum_func func, void *context)
 
const EXPORT char * profiler_snapshot_entry_name (profiler_snapshot_entry_t *entry)
 
EXPORT profiler_time_entries_t * profiler_snapshot_entry_times (profiler_snapshot_entry_t *entry)
 
EXPORT uint64_t profiler_snapshot_entry_min_time (profiler_snapshot_entry_t *entry)
 
EXPORT uint64_t profiler_snapshot_entry_max_time (profiler_snapshot_entry_t *entry)
 
EXPORT uint64_t profiler_snapshot_entry_overall_count (profiler_snapshot_entry_t *entry)
 
EXPORT profiler_time_entries_t * profiler_snapshot_entry_times_between_calls (profiler_snapshot_entry_t *entry)
 
EXPORT uint64_t profiler_snapshot_entry_expected_time_between_calls (profiler_snapshot_entry_t *entry)
 
EXPORT uint64_t profiler_snapshot_entry_min_time_between_calls (profiler_snapshot_entry_t *entry)
 
EXPORT uint64_t profiler_snapshot_entry_max_time_between_calls (profiler_snapshot_entry_t *entry)
 
EXPORT uint64_t profiler_snapshot_entry_overall_between_calls_count (profiler_snapshot_entry_t *entry)
 

Macro Definition Documentation

◆ PRINTFATTR

#define PRINTFATTR (   f,
 
)    __attribute__((__format__(__printf__, f, a)))

Typedef Documentation

◆ profiler_entry_enum_func

typedef bool(* profiler_entry_enum_func) (void *context, profiler_snapshot_entry_t *entry)

◆ profiler_name_filter_func

typedef bool(* profiler_name_filter_func) (void *data, const char *name, bool *remove)

◆ profiler_name_store_t

typedef struct profiler_name_store profiler_name_store_t

◆ profiler_snapshot_entry_t

typedef struct profiler_snapshot_entry profiler_snapshot_entry_t

◆ profiler_snapshot_t

typedef struct profiler_snapshot profiler_snapshot_t

◆ profiler_time_entry_t

Function Documentation

◆ DARRAY()

typedef DARRAY ( profiler_time_entry_t  )

◆ profile_end()

EXPORT void profile_end ( const char *  name)

◆ profile_reenable_thread()

EXPORT void profile_reenable_thread ( void  )

◆ profile_register_root()

EXPORT void profile_register_root ( const char *  name,
uint64_t  expected_time_between_calls 
)

◆ profile_snapshot_create()

EXPORT profiler_snapshot_t* profile_snapshot_create ( void  )

◆ profile_snapshot_free()

EXPORT void profile_snapshot_free ( profiler_snapshot_t snap)

◆ profile_start()

EXPORT void profile_start ( const char *  name)

◆ profile_store_name()

const EXPORT char* profile_store_name ( profiler_name_store_t store,
const char *  format,
  ... 
)

◆ profiler_free()

EXPORT void profiler_free ( void  )

◆ profiler_name_store_create()

EXPORT profiler_name_store_t* profiler_name_store_create ( void  )

◆ profiler_name_store_free()

EXPORT void profiler_name_store_free ( profiler_name_store_t store)

◆ profiler_print()

EXPORT void profiler_print ( profiler_snapshot_t snap)

◆ profiler_print_time_between_calls()

EXPORT void profiler_print_time_between_calls ( profiler_snapshot_t snap)

◆ profiler_snapshot_dump_csv()

EXPORT bool profiler_snapshot_dump_csv ( const profiler_snapshot_t snap,
const char *  filename 
)

◆ profiler_snapshot_dump_csv_gz()

EXPORT bool profiler_snapshot_dump_csv_gz ( const profiler_snapshot_t snap,
const char *  filename 
)

◆ profiler_snapshot_entry_expected_time_between_calls()

EXPORT uint64_t profiler_snapshot_entry_expected_time_between_calls ( profiler_snapshot_entry_t entry)

◆ profiler_snapshot_entry_max_time()

EXPORT uint64_t profiler_snapshot_entry_max_time ( profiler_snapshot_entry_t entry)

◆ profiler_snapshot_entry_max_time_between_calls()

EXPORT uint64_t profiler_snapshot_entry_max_time_between_calls ( profiler_snapshot_entry_t entry)

◆ profiler_snapshot_entry_min_time()

EXPORT uint64_t profiler_snapshot_entry_min_time ( profiler_snapshot_entry_t entry)

◆ profiler_snapshot_entry_min_time_between_calls()

EXPORT uint64_t profiler_snapshot_entry_min_time_between_calls ( profiler_snapshot_entry_t entry)

◆ profiler_snapshot_entry_name()

const EXPORT char* profiler_snapshot_entry_name ( profiler_snapshot_entry_t entry)

◆ profiler_snapshot_entry_overall_between_calls_count()

EXPORT uint64_t profiler_snapshot_entry_overall_between_calls_count ( profiler_snapshot_entry_t entry)

◆ profiler_snapshot_entry_overall_count()

EXPORT uint64_t profiler_snapshot_entry_overall_count ( profiler_snapshot_entry_t entry)

◆ profiler_snapshot_entry_times()

EXPORT profiler_time_entries_t* profiler_snapshot_entry_times ( profiler_snapshot_entry_t entry)

◆ profiler_snapshot_entry_times_between_calls()

EXPORT profiler_time_entries_t* profiler_snapshot_entry_times_between_calls ( profiler_snapshot_entry_t entry)

◆ profiler_snapshot_enumerate_children()

EXPORT void profiler_snapshot_enumerate_children ( profiler_snapshot_entry_t entry,
profiler_entry_enum_func  func,
void *  context 
)

◆ profiler_snapshot_enumerate_roots()

EXPORT void profiler_snapshot_enumerate_roots ( profiler_snapshot_t snap,
profiler_entry_enum_func  func,
void *  context 
)

◆ profiler_snapshot_filter_roots()

EXPORT void profiler_snapshot_filter_roots ( profiler_snapshot_t snap,
profiler_name_filter_func  func,
void *  data 
)

◆ profiler_snapshot_num_children()

EXPORT size_t profiler_snapshot_num_children ( profiler_snapshot_entry_t entry)

◆ profiler_snapshot_num_roots()

EXPORT size_t profiler_snapshot_num_roots ( profiler_snapshot_t snap)

◆ profiler_start()

EXPORT void profiler_start ( void  )

◆ profiler_stop()

EXPORT void profiler_stop ( void  )