diff --git a/audio/audio_driver.c b/audio/audio_driver.c index ff921149e7..1034706a7e 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -537,7 +537,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) return false; rarch_perf_init(&audio_convert_s16, "audio_convert_s16"); - retro_perf_start(&audio_convert_s16); + performance_counter_start(&audio_convert_s16); audio_convert_s16_to_float(audio_driver_data.data, data, samples, audio_driver_data.volume_gain); performance_counter_stop(&audio_convert_s16); @@ -551,7 +551,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) if (audio_driver_data.dsp) { rarch_perf_init(&audio_dsp, "audio_dsp"); - retro_perf_start(&audio_dsp); + performance_counter_start(&audio_dsp); rarch_dsp_filter_process(audio_driver_data.dsp, &dsp_data); performance_counter_stop(&audio_dsp); @@ -580,7 +580,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) if (!audio_driver_data.use_float) { rarch_perf_init(&audio_convert_float, "audio_convert_float"); - retro_perf_start(&audio_convert_float); + performance_counter_start(&audio_convert_float); audio_convert_float_to_s16(audio_driver_data.output_samples.conv_buf, (const float*)output_data, output_frames * 2); performance_counter_stop(&audio_convert_float); @@ -837,7 +837,7 @@ bool audio_driver_init_resampler(void) void audio_driver_process_resampler(struct resampler_data *data) { rarch_perf_init(&resampler_proc, "resampler_proc"); - retro_perf_start(&resampler_proc); + performance_counter_start(&resampler_proc); rarch_resampler_process(audio_driver_resampler, audio_driver_resampler_data, data); performance_counter_stop(&resampler_proc); diff --git a/audio/drivers/ctr_csnd_audio.c b/audio/drivers/ctr_csnd_audio.c index 66e8edc3f5..eb41e5de09 100644 --- a/audio/drivers/ctr_csnd_audio.c +++ b/audio/drivers/ctr_csnd_audio.c @@ -170,7 +170,7 @@ static ssize_t ctr_csnd_audio_write(void *data, const void *buf, size_t size) (void)current_tick; rarch_perf_init(&ctraudio_f, "ctraudio_f"); - retro_perf_start(&ctraudio_f); + performance_counter_start(&ctraudio_f); ctr_csnd_audio_update_playpos(ctr); diff --git a/audio/drivers/ctr_dsp_audio.c b/audio/drivers/ctr_dsp_audio.c index fc74b42af6..2311b365e2 100644 --- a/audio/drivers/ctr_dsp_audio.c +++ b/audio/drivers/ctr_dsp_audio.c @@ -117,7 +117,7 @@ static ssize_t ctr_dsp_audio_write(void *data, const void *buf, size_t size) } rarch_perf_init(&ctraudio_dsp_f, "ctraudio_dsp_f"); - retro_perf_start(&ctraudio_dsp_f); + performance_counter_start(&ctraudio_dsp_f); pos = ctr->pos << 2; diff --git a/camera/drivers/video4linux2.c b/camera/drivers/video4linux2.c index e3a47c6837..4877f4c507 100644 --- a/camera/drivers/video4linux2.c +++ b/camera/drivers/video4linux2.c @@ -71,7 +71,7 @@ static void process_image(video4linux_t *v4l, const uint8_t *buffer_yuv) static struct retro_perf_counter yuv_convert_direct = {0}; rarch_perf_init(&yuv_convert_direct, "yuv_convert_direct"); - retro_perf_start(&yuv_convert_direct); + performance_counter_start(&yuv_convert_direct); scaler_ctx_scale(&v4l->scaler, v4l->buffer_output, buffer_yuv); performance_counter_stop(&yuv_convert_direct); } diff --git a/dynamic.c b/dynamic.c index cd0a26dfb3..10acbd8764 100644 --- a/dynamic.c +++ b/dynamic.c @@ -1228,7 +1228,7 @@ bool rarch_environment_cb(unsigned cmd, void *data) cb->get_perf_counter = cpu_features_get_perf_counter; cb->perf_register = retro_perf_register; - cb->perf_start = retro_perf_start; + cb->perf_start = performance_counter_start; cb->perf_stop = performance_counter_stop; cb->perf_log = retro_perf_log; break; diff --git a/gfx/d3d/d3d.cpp b/gfx/d3d/d3d.cpp index a21a7abb0e..59d8a7a9d8 100644 --- a/gfx/d3d/d3d.cpp +++ b/gfx/d3d/d3d.cpp @@ -1448,7 +1448,7 @@ static bool d3d_frame(void *data, const void *frame, video_driver_get_size(&width, &height); rarch_perf_init(&d3d_frame, "d3d_frame"); - retro_perf_start(&d3d_frame); + performance_counter_start(&d3d_frame); /* We cannot recover in fullscreen. */ if (d3d->needs_restore) diff --git a/gfx/d3d/render_chain_cg.cpp b/gfx/d3d/render_chain_cg.cpp index 5c69c934c1..1c2e3bac5c 100644 --- a/gfx/d3d/render_chain_cg.cpp +++ b/gfx/d3d/render_chain_cg.cpp @@ -1505,7 +1505,7 @@ static bool cg_d3d9_renderchain_read_viewport(void *data, uint8_t *buffer) video_driver_get_size(&width, &height); rarch_perf_init(&d3d_read_viewport, "d3d_read_viewport"); - retro_perf_start(&d3d_read_viewport); + performance_counter_start(&d3d_read_viewport); (void)data; (void)buffer; diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index 9c692d62ed..0a1c0723b9 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -620,7 +620,7 @@ static bool ctr_frame(void* data, const void* frame, fflush(stdout); rarch_perf_init(&ctrframe_f, "ctrframe_f"); - retro_perf_start(&ctrframe_f); + performance_counter_start(&ctrframe_f); if (ctr->should_resize) ctr_update_viewport(ctr); diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index b82fb71081..4989fe81d1 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1470,7 +1470,7 @@ static INLINE void gl_copy_frame(gl_t *gl, const void *frame, static struct retro_perf_counter copy_frame = {0}; rarch_perf_init(©_frame, "copy_frame"); - retro_perf_start(©_frame); + performance_counter_start(©_frame); #if defined(HAVE_OPENGLES2) #if defined(HAVE_EGL) @@ -1661,7 +1661,7 @@ static void gl_pbo_async_readback(gl_t *gl) /* Read asynchronously into PBO buffer. */ rarch_perf_init(&async_readback, "async_readback"); - retro_perf_start(&async_readback); + performance_counter_start(&async_readback); glReadBuffer(GL_BACK); #ifdef HAVE_OPENGLES3 glReadPixels(gl->vp.x, gl->vp.y, @@ -1771,7 +1771,7 @@ static bool gl_frame(void *data, const void *frame, settings_t *settings = config_get_ptr(); rarch_perf_init(&frame_run, "frame_run"); - retro_perf_start(&frame_run); + performance_counter_start(&frame_run); if (!gl) return false; @@ -2023,7 +2023,7 @@ static bool gl_frame(void *data, const void *frame, static struct retro_perf_counter gl_fence = {0}; rarch_perf_init(&gl_fence, "gl_fence"); - retro_perf_start(&gl_fence); + performance_counter_start(&gl_fence); glClear(GL_COLOR_BUFFER_BIT); gl->fences[gl->fence_count++] = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); @@ -3138,7 +3138,7 @@ static bool gl_read_viewport(void *data, uint8_t *buffer) context_bind_hw_render(false); rarch_perf_init(&read_viewport, "read_viewport"); - retro_perf_start(&read_viewport); + performance_counter_start(&read_viewport); num_pixels = gl->vp.width * gl->vp.height; diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index ac8e657785..d172d78a3d 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -1438,7 +1438,7 @@ static bool gx_frame(void *data, const void *frame, settings_t *settings = config_get_ptr(); rarch_perf_init(&gx_frame, "gx_frame"); - retro_perf_start(&gx_frame); + performance_counter_start(&gx_frame); if(!gx || (!frame && !gx->menu_texture_enable)) return true; @@ -1474,7 +1474,7 @@ static bool gx_frame(void *data, const void *frame, static struct retro_perf_counter gx_frame_convert = {0}; rarch_perf_init(&gx_frame_convert, "gx_frame_convert"); - retro_perf_start(&gx_frame_convert); + performance_counter_start(&gx_frame_convert); if (gx->rgb32) convert_texture32(frame, g_tex.data, width, height, pitch); diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index 8f82004044..5d56279968 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -527,7 +527,7 @@ static bool psp_frame(void *data, const void *frame, psp->draw_buffer = FROM_GU_POINTER(sceGuSwapBuffers()); rarch_perf_init(&psp_frame_run, "psp_frame_run"); - retro_perf_start(&psp_frame_run); + performance_counter_start(&psp_frame_run); if (psp->should_resize) psp_update_viewport(psp); diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index fc2150734d..0b48182697 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -348,7 +348,7 @@ static void sdl_refresh_input_size(sdl2_video_t *vid, bool menu, bool rgb32, sdl_tex_zero(target); rarch_perf_init(&sdl_create_texture, "sdl_create_texture"); - retro_perf_start(&sdl_create_texture); + performance_counter_start(&sdl_create_texture); if (menu) format = rgb32 ? SDL_PIXELFORMAT_ARGB8888 : SDL_PIXELFORMAT_RGBA4444; @@ -512,7 +512,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, sdl_refresh_input_size(vid, false, vid->video.rgb32, width, height, pitch); rarch_perf_init(&sdl_copy_frame, "sdl_copy_frame"); - retro_perf_start(&sdl_copy_frame); + performance_counter_start(&sdl_copy_frame); SDL_UpdateTexture(vid->frame.tex, NULL, frame, pitch); @@ -627,7 +627,7 @@ static bool sdl2_gfx_read_viewport(void *data, uint8_t *buffer) static struct retro_perf_counter sdl2_gfx_read_viewport = {0}; rarch_perf_init(&sdl2_gfx_read_viewport, "sdl2_gfx_read_viewport"); - retro_perf_start(&sdl2_gfx_read_viewport); + performance_counter_start(&sdl2_gfx_read_viewport); video_driver_cached_frame_render(); @@ -703,7 +703,7 @@ static void sdl2_poke_set_texture_frame(void *data, const void *frame, bool rgb3 width * (rgb32 ? 4 : 2)); rarch_perf_init(©_texture_frame, "copy_texture_frame"); - retro_perf_start(©_texture_frame); + performance_counter_start(©_texture_frame); SDL_UpdateTexture(vid->menu.tex, NULL, frame, vid->menu.pitch); diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index 1380dade79..b39ad4fcf8 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -343,7 +343,7 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, SDL_LockSurface(vid->screen); rarch_perf_init(&sdl_scale, "sdl_scale"); - retro_perf_start(&sdl_scale); + performance_counter_start(&sdl_scale); video_frame_scale( &vid->scaler, diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index a0411bf3c1..0277ba1945 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -375,7 +375,7 @@ static bool vg_frame(void *data, const void *frame, static struct retro_perf_counter vg_image = {0}; rarch_perf_init(&vg_fr, "vg_fr"); - retro_perf_start(&vg_fr); + performance_counter_start(&vg_fr); video_driver_get_size(&width, &height); @@ -402,7 +402,7 @@ static bool vg_frame(void *data, const void *frame, vgSeti(VG_SCISSORING, VG_TRUE); rarch_perf_init(&vg_image, "vg_image"); - retro_perf_start(&vg_image); + performance_counter_start(&vg_image); vg_copy_frame(vg, frame, frame_width, frame_height, pitch); performance_counter_stop(&vg_image); diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 95fb88316f..9f6d6966cc 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1463,7 +1463,7 @@ static bool vulkan_frame(void *data, const void *frame, rarch_perf_init(&begin_cmd, "begin_command"); rarch_perf_init(&build_cmd, "build_command"); rarch_perf_init(&end_cmd, "end_command"); - retro_perf_start(&frame_run); + performance_counter_start(&frame_run); video_driver_get_size(&width, &height); @@ -1475,7 +1475,7 @@ static bool vulkan_frame(void *data, const void *frame, vulkan_buffer_chain_discard(&chain->vbo); vulkan_buffer_chain_discard(&chain->ubo); - retro_perf_start(&begin_cmd); + performance_counter_start(&begin_cmd); /* Start recording the command buffer. */ vk->cmd = chain->cmd; begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; @@ -1489,7 +1489,7 @@ static bool vulkan_frame(void *data, const void *frame, vulkan_flush_caches(vk); /* Upload texture */ - retro_perf_start(©_frame); + performance_counter_start(©_frame); if (frame && !vk->hw.enable) { unsigned y; @@ -1544,7 +1544,7 @@ static bool vulkan_frame(void *data, const void *frame, vulkan_filter_chain_notify_sync_index(vk->filter_chain, frame_index); vulkan_filter_chain_set_frame_count(vk->filter_chain, frame_count); - retro_perf_start(&build_cmd); + performance_counter_start(&build_cmd); /* Render offscreen filter chain passes. */ { /* Set the source texture in the filter chain */ @@ -1717,7 +1717,7 @@ static bool vulkan_frame(void *data, const void *frame, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT); } - retro_perf_start(&end_cmd); + performance_counter_start(&end_cmd); VKFUNC(vkEndCommandBuffer)(vk->cmd); performance_counter_stop(&end_cmd); @@ -1753,7 +1753,7 @@ static bool vulkan_frame(void *data, const void *frame, performance_counter_stop(&frame_run); - retro_perf_start(&queue_submit); + performance_counter_start(&queue_submit); #ifdef HAVE_THREADS slock_lock(vk->context->queue_lock); @@ -1765,7 +1765,7 @@ static bool vulkan_frame(void *data, const void *frame, #endif performance_counter_stop(&queue_submit); - retro_perf_start(&swapbuffers); + performance_counter_start(&swapbuffers); video_context_driver_swap_buffers(); performance_counter_stop(&swapbuffers); @@ -2077,7 +2077,7 @@ static bool vulkan_read_viewport(void *data, uint8_t *buffer) return false; rarch_perf_init(&stream_readback, "stream_readback"); - retro_perf_start(&stream_readback); + performance_counter_start(&stream_readback); buffer += 3 * (vk->vp.height - 1) * vk->vp.width; VKFUNC(vkMapMemory)(vk->context->device, staging->memory, diff --git a/gfx/video_driver.c b/gfx/video_driver.c index deccb79047..d2261af3c6 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1069,7 +1069,7 @@ static bool video_driver_frame_filter(const void *data, *output_pitch = (*output_width) * video_driver_state.filter.out_bpp; - retro_perf_start(&softfilter_process); + performance_counter_start(&softfilter_process); rarch_softfilter_process(video_driver_state.filter.filter, video_driver_state.filter.buffer, *output_pitch, data, width, height, pitch); @@ -2060,7 +2060,7 @@ static bool video_pixel_frame_scale(const void *data, if (data == RETRO_HW_FRAME_BUFFER_VALID) return false; - retro_perf_start(&video_frame_conv); + performance_counter_start(&video_frame_conv); video_driver_scaler_ptr->scaler->in_width = width; video_driver_scaler_ptr->scaler->in_height = height; diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index ca72731fb4..ff8a7a4644 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -671,7 +671,7 @@ static bool video_thread_frame(void *data, const void *frame_, } rarch_perf_init(&thr_frame, "thr_frame"); - retro_perf_start(&thr_frame); + performance_counter_start(&thr_frame); copy_stride = width * (thr->info.rgb32 ? sizeof(uint32_t) : sizeof(uint16_t)); diff --git a/managers/state_manager.c b/managers/state_manager.c index 9608087b26..f4773e06f5 100644 --- a/managers/state_manager.c +++ b/managers/state_manager.c @@ -573,11 +573,11 @@ recheckcapacity:; } rarch_perf_init(&gen_deltas, "gen_deltas"); - retro_perf_start(&gen_deltas); + performance_counter_start(&gen_deltas); - oldb = state->thisblock; - newb = state->nextblock; - compressed = state->head + sizeof(size_t); + oldb = state->thisblock; + newb = state->nextblock; + compressed = state->head + sizeof(size_t); compressed += state_manager_raw_compress(oldb, newb, state->blocksize, compressed); @@ -761,7 +761,7 @@ void state_manager_check_rewind(bool pressed) state_manager_push_where(rewind_state.state, &state); rarch_perf_init(&rewind_serialize, "rewind_serialize"); - retro_perf_start(&rewind_serialize); + performance_counter_start(&rewind_serialize); serial_info.data = state; serial_info.size = rewind_state.size; diff --git a/performance_counters.c b/performance_counters.c index b1fc6605ad..1b22e53960 100644 --- a/performance_counters.c +++ b/performance_counters.c @@ -131,7 +131,7 @@ int rarch_perf_init(struct retro_perf_counter *perf, const char *name) return 0; } -void retro_perf_start(struct retro_perf_counter *perf) +void performance_counter_start(struct retro_perf_counter *perf) { if (!runloop_ctl(RUNLOOP_CTL_IS_PERFCNT_ENABLE, NULL) || !perf) return; diff --git a/performance_counters.h b/performance_counters.h index 4940f9c5b9..6cc0c3f4a5 100644 --- a/performance_counters.h +++ b/performance_counters.h @@ -60,12 +60,12 @@ void rarch_perf_log(void); int rarch_perf_init(struct retro_perf_counter *perf, const char *name); /** - * retro_perf_start: + * performance_counter_start: * @perf : pointer to performance counter * * Start performance counter. **/ -void retro_perf_start(struct retro_perf_counter *perf); +void performance_counter_start(struct retro_perf_counter *perf); /** * performance_counter_stop: