63 #ifndef __APP_PERF_STATS_H__ 64 #define __APP_PERF_STATS_H__ 96 #if defined(SOC_J784S4) 97 APP_PERF_HWA_VPAC2_VISS,
98 APP_PERF_HWA_VPAC2_LDC,
99 APP_PERF_HWA_VPAC2_NF,
100 APP_PERF_HWA_VPAC2_MSC0,
101 APP_PERF_HWA_VPAC2_MSC1,
109 #define APP_PERF_STATS_TASK_NAME_MAX (12u) 112 #define APP_PERF_STATS_TASK_MAX (24u) 115 #define APP_PERF_POINT_NAME_MAX (16u) 118 #define APP_PERF_POINT_MAX_FILENAME (256u) 121 #define APP_PERF_MAX_LINE_SIZE (1024u) #define APP_PERF_STATS_TASK_MAX
Max number of tasks whoose information can be retrived.
Definition: app_perf_stats.h:112
int32_t appPerfStatsRemoteServiceInit()
Initialize perf statistics collector module.
void appPerfPointSetName(app_perf_point_t *prm, const char *name)
Set name for a performance point.
uint32_t mutex_peak
Definition: app_perf_stats.h:247
int32_t appPerfStatsHwaLoadPrintAll()
Print HWA load statistics for all enabled CPUs.
OS Resource usage information.
Definition: app_perf_stats.h:233
Summary of CPU load.
Definition: app_perf_stats.h:126
uint64_t sum
Definition: app_perf_stats.h:142
Detailed CPU Mem Stats information.
Definition: app_perf_stats.h:176
int32_t appPerfStatsExportAll(FILE *fp, app_perf_point_t *perf_points[], uint32_t num_points)
Exports the performance to a .md file.
void appPerfPointPrint(app_perf_point_t *prm)
Print a performance point.
uint32_t num_tasks
Definition: app_perf_stats.h:178
int32_t appPerfStatsCpuMemStatsPrint(uint32_t app_cpu_id, app_perf_stats_mem_stats_t *cpu_stats)
Print CPU peformance statistics.
int32_t appPerfStatsDdrStatsPrintAll()
Print DDR BW statistics.
uint32_t write_bw_avg
Definition: app_perf_stats.h:218
uint64_t total_time
Definition: app_perf_stats.h:189
Definition: app_perf_stats.h:95
Definition: app_perf_stats.h:94
void appPerfPointPrintFPS(app_perf_point_t *prm)
Print a performance point in units of FPS.
uint32_t read_bw_peak
Definition: app_perf_stats.h:219
int32_t appPerfStatsCpuOsStatsGet(uint32_t app_cpu_id, app_perf_stats_os_stats_t *os_stats)
Get CPU OS statistics.
int32_t appPerfStatsRegisterTask(void *task_handle, const char *name)
Register a task for task load calculation.
uint32_t task_peak
Definition: app_perf_stats.h:252
Heap statistics and information.
Definition: app_mem.h:221
uint32_t mailbox_count
Definition: app_perf_stats.h:240
int32_t appPerfStatsCpuLoadGet(uint32_t app_cpu_id, app_perf_stats_cpu_load_t *cpu_load)
Get CPU peformance statistics.
uint32_t hwi_load
Definition: app_perf_stats.h:129
int32_t appPerfStatsCpuTaskStacksStatsGet(uint32_t app_cpu_id, app_perf_stats_task_stats_t *cpu_stats)
Get CPU task stack statistics.
uint32_t starting_task
Definition: app_perf_stats.h:166
#define APP_PERF_STATS_TASK_NAME_MAX
Max size of task name string.
Definition: app_perf_stats.h:109
#define APP_PERF_POINT_NAME_MAX
Max size of performance point name string.
Definition: app_perf_stats.h:115
CPU task statistics information.
Definition: app_perf_stats.h:153
uint32_t queue_peak
Definition: app_perf_stats.h:248
uint32_t write_bw_peak
Definition: app_perf_stats.h:220
int32_t appPerfStatsHwaLoadResetAll()
Reset HWA load calc for all HWAs.
void appPerfStatsResetAll()
Reset all perf stats.
uint64_t max
Definition: app_perf_stats.h:145
int32_t appPerfStatsInit()
Initialize perf statistics collector module.
void appPerfPointBegin(app_perf_point_t *prm)
Start a performance point.
DDR BW information.
Definition: app_perf_stats.h:215
uint32_t queue_count
Definition: app_perf_stats.h:237
int32_t appPerfStatsDdrStatsResetAll()
Reset DDR BW statistics.
uint32_t counter1_total
Definition: app_perf_stats.h:224
int32_t appPerfStatsExportCloseFile(FILE *fp)
Closes performance file opened by appPerfStatsExportOpenFile.
int32_t appPerfStatsCpuLoadResetAll()
Reset CPU load calc for all enabled CPUs.
uint32_t clock_peak
Definition: app_perf_stats.h:253
uint32_t mutex_count
Definition: app_perf_stats.h:236
int32_t appPerfStatsCpuLoadReset(uint32_t app_cpu_id)
Reset CPU load statistics.
int32_t appPerfStatsCpuStatsPrintAll()
Print CPU peformance statistics for all enabled CPUs.
uint32_t counter0_total
Definition: app_perf_stats.h:223
uint64_t avg
Definition: app_perf_stats.h:143
Definition: app_perf_stats.h:103
int32_t appPerfStatsPrintAll()
Print all performance related information.
uint32_t event_count
Definition: app_perf_stats.h:238
uint64_t tmp
Definition: app_perf_stats.h:141
uint32_t semaphore_peak
Definition: app_perf_stats.h:246
uint32_t task_load
Definition: app_perf_stats.h:156
int32_t appPerfStatsCpuTaskStacksStatsPrint(uint32_t app_cpu_id, app_perf_stats_task_stats_t *cpu_stats)
Print CPU task stack statistics.
int32_t appPerfStatsCpuOsStatsPrint(uint32_t app_cpu_id, app_perf_stats_os_stats_t *os_stats, uint32_t showPeak)
Print CPU OS statistics.
uint32_t mailbox_peak
Definition: app_perf_stats.h:251
FILE * appPerfStatsExportOpenFile(const char *output_file_path, const char *output_file_prefix)
Opens a .md file and returns the pointer to application.
uint32_t semaphore_count
Definition: app_perf_stats.h:235
uint32_t task_count
Definition: app_perf_stats.h:241
char * appPerfStatsGetHwaName(app_perf_hwa_id_t hwa_id)
Get HWA name.
uint64_t min
Definition: app_perf_stats.h:144
void appPerfPointReset(app_perf_point_t *prm)
Reset a performance point, MUST be called once before begin/end.
void appPerfStatsHwaUpdateLoad(app_perf_hwa_id_t id, uint32_t active_time_in_usecs, uint32_t pixels_processed)
Update load numbers against a HWA.
Detailed CPU Task Stats information.
Definition: app_perf_stats.h:163
Definition: app_perf_stats.h:91
uint32_t heap_peak
Definition: app_perf_stats.h:250
uint32_t cpu_load
Definition: app_perf_stats.h:128
HWA load information for all HWAs.
Definition: app_perf_stats.h:202
#define APP_MEM_HEAP_MAX
Max heaps in system.
Definition: app_mem.h:157
uint32_t total_available_bw
Definition: app_perf_stats.h:221
uint32_t num_tasks
Definition: app_perf_stats.h:165
int32_t appPerfStatsCpuTaskStatsGet(uint32_t app_cpu_id, app_perf_stats_task_stats_t *cpu_stats)
Get CPU peformance statistics.
int32_t appPerfStatsCpuMemStatsGet(uint32_t app_cpu_id, app_perf_stats_mem_stats_t *cpu_stats)
Get Memory statistics.
int32_t appPerfStatsCpuLoadPrintAll()
Print CPU load statistics for all enabled CPUs.
uint32_t swi_load
Definition: app_perf_stats.h:130
Definition: app_perf_stats.h:93
uint32_t counter2_total
Definition: app_perf_stats.h:225
void appPerfPointEnd(app_perf_point_t *prm)
End a performance point.
Definition: app_perf_stats.h:92
uint32_t heap_count
Definition: app_perf_stats.h:239
uint64_t active_time
Definition: app_perf_stats.h:190
uint64_t pixels_processed
Definition: app_perf_stats.h:191
uint32_t read_bw_avg
Definition: app_perf_stats.h:217
Definition: app_perf_stats.h:89
Performance point, all time in units of usecs.
Definition: app_perf_stats.h:138
int32_t appPerfStatsDeInit()
De-Initialize perf statistics collector module.
uint32_t hwi_peak
Definition: app_perf_stats.h:254
int32_t appPerfStatsCpuTaskStatsPrint(uint32_t app_cpu_id, app_perf_stats_task_stats_t *cpu_stats)
Print CPU peformance statistics.
uint64_t last_timestamp
Definition: app_perf_stats.h:192
uint32_t hwi_count
Definition: app_perf_stats.h:243
int32_t appPerfStatsHwaStatsGet(uint32_t app_cpu_id, app_perf_stats_hwa_stats_t *hwa_stats)
Get HWA peformance statistics.
Definition: app_perf_stats.h:90
uint32_t timer_count
Definition: app_perf_stats.h:244
int32_t appPerfStatsDdrStatsGet(app_perf_stats_ddr_stats_t *ddr_stats)
Get DDR BW statistics.
uint32_t clock_count
Definition: app_perf_stats.h:242
int32_t appPerfStatsCpuLoadPrint(uint32_t app_cpu_id, app_perf_stats_cpu_load_t *cpu_load)
Print CPU load statistics.
uint32_t event_peak
Definition: app_perf_stats.h:249
Definition: app_perf_stats.h:88
HWA load information.
Definition: app_perf_stats.h:187
uint64_t num
Definition: app_perf_stats.h:146
int32_t appPerfStatsHwaLoadPrint(app_perf_stats_hwa_stats_t *hwa_load)
Print HWA load statistics.
app_perf_hwa_id_t
HWA ID.
Definition: app_perf_stats.h:86
int32_t appPerfStatsDdrStatsPrint(app_perf_stats_ddr_stats_t *ddr_load)
Print DDR BW statistics.
uint32_t counter3_total
Definition: app_perf_stats.h:226
uint32_t timer_peak
Definition: app_perf_stats.h:255