From 18355d47489ed330e2ecd0a73225cba2dbca1422 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 May 2016 09:48:14 +0200 Subject: [PATCH] Rename retro_perf_stop --- audio/audio_driver.c | 8 ++++---- audio/drivers/ctr_csnd_audio.c | 2 +- audio/drivers/ctr_dsp_audio.c | 2 +- camera/drivers/video4linux2.c | 2 +- dynamic.c | 2 +- gfx/d3d/d3d.cpp | 2 +- gfx/d3d/render_chain_cg.cpp | 2 +- gfx/drivers/ctr_gfx.c | 4 +--- gfx/drivers/gl.c | 12 ++++++------ gfx/drivers/gx_gfx.c | 4 ++-- gfx/drivers/psp1_gfx.c | 2 +- gfx/drivers/sdl2_gfx.c | 8 ++++---- gfx/drivers/sdl_gfx.c | 2 +- gfx/drivers/vg.c | 4 ++-- gfx/drivers/vulkan.c | 16 ++++++++-------- gfx/video_driver.c | 4 ++-- gfx/video_thread_wrapper.c | 2 +- managers/state_manager.c | 4 ++-- performance_counters.c | 2 +- performance_counters.h | 4 ++-- 20 files changed, 43 insertions(+), 45 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index c875df40f1..ff921149e7 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -540,7 +540,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) retro_perf_start(&audio_convert_s16); audio_convert_s16_to_float(audio_driver_data.data, data, samples, audio_driver_data.volume_gain); - retro_perf_stop(&audio_convert_s16); + performance_counter_stop(&audio_convert_s16); src_data.data_in = audio_driver_data.data; src_data.input_frames = samples >> 1; @@ -553,7 +553,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) rarch_perf_init(&audio_dsp, "audio_dsp"); retro_perf_start(&audio_dsp); rarch_dsp_filter_process(audio_driver_data.dsp, &dsp_data); - retro_perf_stop(&audio_dsp); + performance_counter_stop(&audio_dsp); if (dsp_data.output) { @@ -583,7 +583,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) retro_perf_start(&audio_convert_float); audio_convert_float_to_s16(audio_driver_data.output_samples.conv_buf, (const float*)output_data, output_frames * 2); - retro_perf_stop(&audio_convert_float); + performance_counter_stop(&audio_convert_float); output_data = audio_driver_data.output_samples.conv_buf; output_size = sizeof(int16_t); @@ -840,7 +840,7 @@ void audio_driver_process_resampler(struct resampler_data *data) retro_perf_start(&resampler_proc); rarch_resampler_process(audio_driver_resampler, audio_driver_resampler_data, data); - retro_perf_stop(&resampler_proc); + performance_counter_stop(&resampler_proc); } bool audio_driver_deinit(void) diff --git a/audio/drivers/ctr_csnd_audio.c b/audio/drivers/ctr_csnd_audio.c index 3245876afa..66e8edc3f5 100644 --- a/audio/drivers/ctr_csnd_audio.c +++ b/audio/drivers/ctr_csnd_audio.c @@ -202,7 +202,7 @@ static ssize_t ctr_csnd_audio_write(void *data, const void *buf, size_t size) GSPGPU_FlushDataCache(ctr->l, CTR_CSND_AUDIO_SIZE); GSPGPU_FlushDataCache(ctr->r, CTR_CSND_AUDIO_SIZE); - retro_perf_stop(&ctraudio_f); + performance_counter_stop(&ctraudio_f); return size; } diff --git a/audio/drivers/ctr_dsp_audio.c b/audio/drivers/ctr_dsp_audio.c index 36ffbfc777..fc74b42af6 100644 --- a/audio/drivers/ctr_dsp_audio.c +++ b/audio/drivers/ctr_dsp_audio.c @@ -140,7 +140,7 @@ static ssize_t ctr_dsp_audio_write(void *data, const void *buf, size_t size) ctr->pos += size >> 2; ctr->pos &= CTR_DSP_AUDIO_COUNT_MASK; - retro_perf_stop(&ctraudio_dsp_f); + performance_counter_stop(&ctraudio_dsp_f); return size; } diff --git a/camera/drivers/video4linux2.c b/camera/drivers/video4linux2.c index c5eba58f9b..e3a47c6837 100644 --- a/camera/drivers/video4linux2.c +++ b/camera/drivers/video4linux2.c @@ -73,7 +73,7 @@ static void process_image(video4linux_t *v4l, const uint8_t *buffer_yuv) rarch_perf_init(&yuv_convert_direct, "yuv_convert_direct"); retro_perf_start(&yuv_convert_direct); scaler_ctx_scale(&v4l->scaler, v4l->buffer_output, buffer_yuv); - retro_perf_stop(&yuv_convert_direct); + performance_counter_stop(&yuv_convert_direct); } static int xioctl(int fd, int request, void *args) diff --git a/dynamic.c b/dynamic.c index 1b53e3a1da..cd0a26dfb3 100644 --- a/dynamic.c +++ b/dynamic.c @@ -1229,7 +1229,7 @@ bool rarch_environment_cb(unsigned cmd, void *data) cb->perf_register = retro_perf_register; cb->perf_start = retro_perf_start; - cb->perf_stop = retro_perf_stop; + 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 0083a39401..a21a7abb0e 100644 --- a/gfx/d3d/d3d.cpp +++ b/gfx/d3d/d3d.cpp @@ -1539,7 +1539,7 @@ static bool d3d_frame(void *data, const void *frame, video_context_driver_update_window_title(); - retro_perf_stop(&d3d_frame); + performance_counter_stop(&d3d_frame); video_context_driver_swap_buffers(); diff --git a/gfx/d3d/render_chain_cg.cpp b/gfx/d3d/render_chain_cg.cpp index 5d9999234c..5c69c934c1 100644 --- a/gfx/d3d/render_chain_cg.cpp +++ b/gfx/d3d/render_chain_cg.cpp @@ -1557,7 +1557,7 @@ static bool cg_d3d9_renderchain_read_viewport(void *data, uint8_t *buffer) ret = false; end: - retro_perf_stop(&d3d_read_viewport); + performance_counter_stop(&d3d_read_viewport); if (target) target->Release(); if (dest) diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index ead9fcbd99..9c692d62ed 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -831,9 +831,7 @@ static bool ctr_frame(void* data, const void* frame, framebufferInfo[framebufferInfoHeader[0x0]] = topFramebufferInfo; framebufferInfoHeader[0x1]=1; - - - retro_perf_stop(&ctrframe_f); + performance_counter_stop(&ctrframe_f); return true; } diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 8734578106..b82fb71081 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1602,7 +1602,7 @@ static INLINE void gl_copy_frame(gl_t *gl, const void *frame, glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); } #endif - retro_perf_stop(©_frame); + performance_counter_stop(©_frame); } static INLINE void gl_set_prev_texture(gl_t *gl, @@ -1672,7 +1672,7 @@ static void gl_pbo_async_readback(gl_t *gl) gl->vp.width, gl->vp.height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL); #endif - retro_perf_stop(&async_readback); + performance_counter_stop(&async_readback); glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); } @@ -1962,7 +1962,7 @@ static bool gl_frame(void *data, const void *frame, video_context_driver_update_window_title(); - retro_perf_stop(&frame_run); + performance_counter_stop(&frame_run); #ifdef HAVE_FBO /* Reset state which could easily mess up libretro core. */ @@ -2039,7 +2039,7 @@ static bool gl_frame(void *data, const void *frame, gl->fence_count * sizeof(GLsync)); } - retro_perf_stop(&gl_fence); + performance_counter_stop(&gl_fence); } #endif @@ -3204,7 +3204,7 @@ static bool gl_read_viewport(void *data, uint8_t *buffer) if (!gl->readback_buffer_screenshot) { - retro_perf_stop(&read_viewport); + performance_counter_stop(&read_viewport); goto error; } @@ -3219,7 +3219,7 @@ static bool gl_read_viewport(void *data, uint8_t *buffer) gl->readback_buffer_screenshot = NULL; } - retro_perf_stop(&read_viewport); + performance_counter_stop(&read_viewport); context_bind_hw_render(true); return true; diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index db5a246816..ac8e657785 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -1484,7 +1484,7 @@ static bool gx_frame(void *data, const void *frame, convert_texture16(frame, g_tex.data, width, height, pitch); DCFlushRange(g_tex.data, height * (width << (gx->rgb32 ? 2 : 1))); - retro_perf_stop(&gx_frame_convert); + performance_counter_stop(&gx_frame_convert); } if (gx->menu_texture_enable && gx->menu_data) @@ -1566,7 +1566,7 @@ static bool gx_frame(void *data, const void *frame, VIDEO_SetNextFramebuffer(gx->framebuf[g_current_framebuf]); VIDEO_Flush(); - retro_perf_stop(&gx_frame); + performance_counter_stop(&gx_frame); return true; } diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index 54d11a2408..8f82004044 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -560,7 +560,7 @@ static bool psp_frame(void *data, const void *frame, sceGuFinish(); - retro_perf_stop(&psp_frame_run); + performance_counter_stop(&psp_frame_run); if(psp->menu.active) { diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 9c8401b8fb..fc2150734d 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -362,7 +362,7 @@ static void sdl_refresh_input_size(sdl2_video_t *vid, bool menu, bool rgb32, target->tex = SDL_CreateTexture(vid->renderer, format, SDL_TEXTUREACCESS_STREAMING, width, height); - retro_perf_stop(&sdl_create_texture); + performance_counter_stop(&sdl_create_texture); if (!target->tex) { @@ -516,7 +516,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, SDL_UpdateTexture(vid->frame.tex, NULL, frame, pitch); - retro_perf_stop(&sdl_copy_frame); + performance_counter_stop(&sdl_copy_frame); } SDL_RenderCopyEx(vid->renderer, vid->frame.tex, NULL, NULL, vid->rotation, NULL, SDL_FLIP_NONE); @@ -642,7 +642,7 @@ static bool sdl2_gfx_read_viewport(void *data, uint8_t *buffer) memcpy(buffer, bgr24->pixels, bgr24->h * bgr24->pitch); - retro_perf_stop(&sdl2_gfx_read_viewport); + performance_counter_stop(&sdl2_gfx_read_viewport); return true; } @@ -707,7 +707,7 @@ static void sdl2_poke_set_texture_frame(void *data, const void *frame, bool rgb3 SDL_UpdateTexture(vid->menu.tex, NULL, frame, vid->menu.pitch); - retro_perf_stop(©_texture_frame); + performance_counter_stop(©_texture_frame); } } diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index bbc58dc24f..1380dade79 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -356,7 +356,7 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, width, height, pitch); - retro_perf_stop(&sdl_scale); + performance_counter_stop(&sdl_scale); if (vid->menu.active) SDL_BlitSurface(vid->menu.frame, NULL, vid->screen, NULL); diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index f7413a50ac..a0411bf3c1 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -404,7 +404,7 @@ static bool vg_frame(void *data, const void *frame, rarch_perf_init(&vg_image, "vg_image"); retro_perf_start(&vg_image); vg_copy_frame(vg, frame, frame_width, frame_height, pitch); - retro_perf_stop(&vg_image); + performance_counter_stop(&vg_image); vgDrawImage(vg->mImage); @@ -415,7 +415,7 @@ static bool vg_frame(void *data, const void *frame, video_context_driver_update_window_title(); - retro_perf_stop(&vg_fr); + performance_counter_stop(&vg_fr); video_context_driver_swap_buffers(); diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index d19ac54d01..95fb88316f 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1482,7 +1482,7 @@ static bool vulkan_frame(void *data, const void *frame, VKFUNC(vkResetCommandBuffer)(vk->cmd, 0); VKFUNC(vkBeginCommandBuffer)(vk->cmd, &begin_info); - retro_perf_stop(&begin_cmd); + performance_counter_stop(&begin_cmd); memset(&vk->tracker, 0, sizeof(vk->tracker)); @@ -1538,7 +1538,7 @@ static bool vulkan_frame(void *data, const void *frame, vk->last_valid_index = frame_index; } - retro_perf_stop(©_frame); + performance_counter_stop(©_frame); /* Notify filter chain about the new sync index. */ vulkan_filter_chain_notify_sync_index(vk->filter_chain, frame_index); @@ -1668,7 +1668,7 @@ static bool vulkan_frame(void *data, const void *frame, if (vk->overlay.enable) vulkan_render_overlay(vk); #endif - retro_perf_stop(&build_cmd); + performance_counter_stop(&build_cmd); /* End the render pass. We're done rendering to backbuffer now. */ VKFUNC(vkCmdEndRenderPass)(vk->cmd); @@ -1719,7 +1719,7 @@ static bool vulkan_frame(void *data, const void *frame, retro_perf_start(&end_cmd); VKFUNC(vkEndCommandBuffer)(vk->cmd); - retro_perf_stop(&end_cmd); + performance_counter_stop(&end_cmd); /* Submit command buffers to GPU. */ @@ -1751,7 +1751,7 @@ static bool vulkan_frame(void *data, const void *frame, submit_info.pSignalSemaphores = &vk->context->swapchain_semaphores[frame_index]; - retro_perf_stop(&frame_run); + performance_counter_stop(&frame_run); retro_perf_start(&queue_submit); @@ -1763,11 +1763,11 @@ static bool vulkan_frame(void *data, const void *frame, #ifdef HAVE_THREADS slock_unlock(vk->context->queue_lock); #endif - retro_perf_stop(&queue_submit); + performance_counter_stop(&queue_submit); retro_perf_start(&swapbuffers); video_context_driver_swap_buffers(); - retro_perf_stop(&swapbuffers); + performance_counter_stop(&swapbuffers); video_context_driver_update_window_title(); @@ -2089,7 +2089,7 @@ static bool vulkan_read_viewport(void *data, uint8_t *buffer) VKFUNC(vkUnmapMemory)(vk->context->device, staging->memory); - retro_perf_stop(&stream_readback); + performance_counter_stop(&stream_readback); } else { diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 7af875e3e4..deccb79047 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1073,7 +1073,7 @@ static bool video_driver_frame_filter(const void *data, rarch_softfilter_process(video_driver_state.filter.filter, video_driver_state.filter.buffer, *output_pitch, data, width, height, pitch); - retro_perf_stop(&softfilter_process); + performance_counter_stop(&softfilter_process); if (settings->video.post_filter_record) recording_dump_frame(video_driver_state.filter.buffer, @@ -2072,7 +2072,7 @@ static bool video_pixel_frame_scale(const void *data, scaler_ctx_scale(video_driver_scaler_ptr->scaler, video_driver_scaler_ptr->scaler_out, data); - retro_perf_stop(&video_frame_conv); + performance_counter_stop(&video_frame_conv); return true; } diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index 3f7b058e53..ca72731fb4 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -741,7 +741,7 @@ static bool video_thread_frame(void *data, const void *frame_, slock_unlock(thr->lock); - retro_perf_stop(&thr_frame); + performance_counter_stop(&thr_frame); thr->last_time = cpu_features_get_time_usec(); return true; diff --git a/managers/state_manager.c b/managers/state_manager.c index ffe31d4f19..9608087b26 100644 --- a/managers/state_manager.c +++ b/managers/state_manager.c @@ -593,7 +593,7 @@ recheckcapacity:; write_size_t(state->head, compressed-state->data); state->head = compressed; - retro_perf_stop(&gen_deltas); + performance_counter_stop(&gen_deltas); } else state->thisblock_valid = true; @@ -768,7 +768,7 @@ void state_manager_check_rewind(bool pressed) core_serialize(&serial_info); - retro_perf_stop(&rewind_serialize); + performance_counter_stop(&rewind_serialize); state_manager_push_do(rewind_state.state); } diff --git a/performance_counters.c b/performance_counters.c index 002222ef5c..b1fc6605ad 100644 --- a/performance_counters.c +++ b/performance_counters.c @@ -140,7 +140,7 @@ void retro_perf_start(struct retro_perf_counter *perf) perf->start = cpu_features_get_perf_counter(); } -void retro_perf_stop(struct retro_perf_counter *perf) +void performance_counter_stop(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 a992a4baa4..4940f9c5b9 100644 --- a/performance_counters.h +++ b/performance_counters.h @@ -68,12 +68,12 @@ int rarch_perf_init(struct retro_perf_counter *perf, const char *name); void retro_perf_start(struct retro_perf_counter *perf); /** - * retro_perf_stop: + * performance_counter_stop: * @perf : pointer to performance counter * * Stop performance counter. **/ -void retro_perf_stop(struct retro_perf_counter *perf); +void performance_counter_stop(struct retro_perf_counter *perf); #ifdef __cplusplus }