From 281a33d61fb13637e8621cf80c4aac746a402d6b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 May 2016 09:58:45 +0200 Subject: [PATCH] Rename function to performance_counter_init --- audio/audio_driver.c | 8 ++++---- audio/drivers/ctr_csnd_audio.c | 2 +- audio/drivers/ctr_dsp_audio.c | 2 +- camera/drivers/video4linux2.c | 2 +- gfx/d3d/d3d.cpp | 2 +- gfx/d3d/render_chain_cg.cpp | 2 +- gfx/drivers/ctr_gfx.c | 2 +- gfx/drivers/gl.c | 10 +++++----- 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 | 2 +- 19 files changed, 40 insertions(+), 40 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index 1034706a7e..cf9661772b 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -536,7 +536,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) if (!audio_driver_data.data) return false; - rarch_perf_init(&audio_convert_s16, "audio_convert_s16"); + performance_counter_init(&audio_convert_s16, "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); @@ -550,7 +550,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"); + performance_counter_init(&audio_dsp, "audio_dsp"); performance_counter_start(&audio_dsp); rarch_dsp_filter_process(audio_driver_data.dsp, &dsp_data); performance_counter_stop(&audio_dsp); @@ -579,7 +579,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"); + performance_counter_init(&audio_convert_float, "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); @@ -836,7 +836,7 @@ bool audio_driver_init_resampler(void) void audio_driver_process_resampler(struct resampler_data *data) { - rarch_perf_init(&resampler_proc, "resampler_proc"); + performance_counter_init(&resampler_proc, "resampler_proc"); performance_counter_start(&resampler_proc); rarch_resampler_process(audio_driver_resampler, audio_driver_resampler_data, data); diff --git a/audio/drivers/ctr_csnd_audio.c b/audio/drivers/ctr_csnd_audio.c index eb41e5de09..d71a85f7b4 100644 --- a/audio/drivers/ctr_csnd_audio.c +++ b/audio/drivers/ctr_csnd_audio.c @@ -169,7 +169,7 @@ static ssize_t ctr_csnd_audio_write(void *data, const void *buf, size_t size) (void)samples_played; (void)current_tick; - rarch_perf_init(&ctraudio_f, "ctraudio_f"); + performance_counter_init(&ctraudio_f, "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 2311b365e2..3b93e23736 100644 --- a/audio/drivers/ctr_dsp_audio.c +++ b/audio/drivers/ctr_dsp_audio.c @@ -116,7 +116,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"); + performance_counter_init(&ctraudio_dsp_f, "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 4877f4c507..14b3b6bce6 100644 --- a/camera/drivers/video4linux2.c +++ b/camera/drivers/video4linux2.c @@ -70,7 +70,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"); + performance_counter_init(&yuv_convert_direct, "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/gfx/d3d/d3d.cpp b/gfx/d3d/d3d.cpp index 59d8a7a9d8..bb04b728fc 100644 --- a/gfx/d3d/d3d.cpp +++ b/gfx/d3d/d3d.cpp @@ -1447,7 +1447,7 @@ static bool d3d_frame(void *data, const void *frame, video_driver_get_size(&width, &height); - rarch_perf_init(&d3d_frame, "d3d_frame"); + performance_counter_init(&d3d_frame, "d3d_frame"); performance_counter_start(&d3d_frame); /* We cannot recover in fullscreen. */ diff --git a/gfx/d3d/render_chain_cg.cpp b/gfx/d3d/render_chain_cg.cpp index 1c2e3bac5c..87eb72af8e 100644 --- a/gfx/d3d/render_chain_cg.cpp +++ b/gfx/d3d/render_chain_cg.cpp @@ -1504,7 +1504,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"); + performance_counter_init(&d3d_read_viewport, "d3d_read_viewport"); performance_counter_start(&d3d_read_viewport); (void)data; diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index 0a1c0723b9..8e1f8290be 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -619,7 +619,7 @@ static bool ctr_frame(void* data, const void* frame, #endif fflush(stdout); - rarch_perf_init(&ctrframe_f, "ctrframe_f"); + performance_counter_init(&ctrframe_f, "ctrframe_f"); performance_counter_start(&ctrframe_f); if (ctr->should_resize) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 4989fe81d1..1a2d0824ff 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1469,7 +1469,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"); + performance_counter_init(©_frame, "copy_frame"); performance_counter_start(©_frame); #if defined(HAVE_OPENGLES2) @@ -1660,7 +1660,7 @@ static void gl_pbo_async_readback(gl_t *gl) video_pixel_get_alignment(gl->vp.width * sizeof(uint32_t))); /* Read asynchronously into PBO buffer. */ - rarch_perf_init(&async_readback, "async_readback"); + performance_counter_init(&async_readback, "async_readback"); performance_counter_start(&async_readback); glReadBuffer(GL_BACK); #ifdef HAVE_OPENGLES3 @@ -1770,7 +1770,7 @@ static bool gl_frame(void *data, const void *frame, gl_t *gl = (gl_t*)data; settings_t *settings = config_get_ptr(); - rarch_perf_init(&frame_run, "frame_run"); + performance_counter_init(&frame_run, "frame_run"); performance_counter_start(&frame_run); if (!gl) @@ -2022,7 +2022,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"); + performance_counter_init(&gl_fence, "gl_fence"); performance_counter_start(&gl_fence); glClear(GL_COLOR_BUFFER_BIT); gl->fences[gl->fence_count++] = @@ -3137,7 +3137,7 @@ static bool gl_read_viewport(void *data, uint8_t *buffer) context_bind_hw_render(false); - rarch_perf_init(&read_viewport, "read_viewport"); + performance_counter_init(&read_viewport, "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 d172d78a3d..c983600c37 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -1437,7 +1437,7 @@ static bool gx_frame(void *data, const void *frame, u8 clear_efb = GX_FALSE; settings_t *settings = config_get_ptr(); - rarch_perf_init(&gx_frame, "gx_frame"); + performance_counter_init(&gx_frame, "gx_frame"); performance_counter_start(&gx_frame); if(!gx || (!frame && !gx->menu_texture_enable)) @@ -1473,7 +1473,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"); + performance_counter_init(&gx_frame_convert, "gx_frame_convert"); performance_counter_start(&gx_frame_convert); if (gx->rgb32) diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index 5d56279968..fbf5647724 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -526,7 +526,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"); + performance_counter_init(&psp_frame_run, "psp_frame_run"); performance_counter_start(&psp_frame_run); if (psp->should_resize) diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 0b48182697..1d19bbebce 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -347,7 +347,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"); + performance_counter_init(&sdl_create_texture, "sdl_create_texture"); performance_counter_start(&sdl_create_texture); if (menu) @@ -511,7 +511,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"); + performance_counter_init(&sdl_copy_frame, "sdl_copy_frame"); performance_counter_start(&sdl_copy_frame); SDL_UpdateTexture(vid->frame.tex, NULL, frame, pitch); @@ -626,7 +626,7 @@ static bool sdl2_gfx_read_viewport(void *data, uint8_t *buffer) sdl2_video_t *vid = (sdl2_video_t*)data; static struct retro_perf_counter sdl2_gfx_read_viewport = {0}; - rarch_perf_init(&sdl2_gfx_read_viewport, "sdl2_gfx_read_viewport"); + performance_counter_init(&sdl2_gfx_read_viewport, "sdl2_gfx_read_viewport"); performance_counter_start(&sdl2_gfx_read_viewport); video_driver_cached_frame_render(); @@ -702,7 +702,7 @@ static void sdl2_poke_set_texture_frame(void *data, const void *frame, bool rgb3 sdl_refresh_input_size(vid, true, rgb32, width, height, width * (rgb32 ? 4 : 2)); - rarch_perf_init(©_texture_frame, "copy_texture_frame"); + performance_counter_init(©_texture_frame, "copy_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 b39ad4fcf8..ab0fd40ee1 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -342,7 +342,7 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, if (SDL_MUSTLOCK(vid->screen)) SDL_LockSurface(vid->screen); - rarch_perf_init(&sdl_scale, "sdl_scale"); + performance_counter_init(&sdl_scale, "sdl_scale"); performance_counter_start(&sdl_scale); video_frame_scale( diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index 0277ba1945..96d92bcd6e 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -374,7 +374,7 @@ static bool vg_frame(void *data, const void *frame, static struct retro_perf_counter vg_fr = {0}; static struct retro_perf_counter vg_image = {0}; - rarch_perf_init(&vg_fr, "vg_fr"); + performance_counter_init(&vg_fr, "vg_fr"); performance_counter_start(&vg_fr); video_driver_get_size(&width, &height); @@ -401,7 +401,7 @@ static bool vg_frame(void *data, const void *frame, vgClear(0, 0, width, height); vgSeti(VG_SCISSORING, VG_TRUE); - rarch_perf_init(&vg_image, "vg_image"); + performance_counter_init(&vg_image, "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 9f6d6966cc..ac0cb764d8 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1456,13 +1456,13 @@ static bool vulkan_frame(void *data, const void *frame, unsigned frame_index = vk->context->current_swapchain_index; - rarch_perf_init(&frame_run, "frame_run"); - rarch_perf_init(©_frame, "copy_frame"); - rarch_perf_init(&swapbuffers, "swapbuffers"); - rarch_perf_init(&queue_submit, "queue_submit"); - rarch_perf_init(&begin_cmd, "begin_command"); - rarch_perf_init(&build_cmd, "build_command"); - rarch_perf_init(&end_cmd, "end_command"); + performance_counter_init(&frame_run, "frame_run"); + performance_counter_init(©_frame, "copy_frame"); + performance_counter_init(&swapbuffers, "swapbuffers"); + performance_counter_init(&queue_submit, "queue_submit"); + performance_counter_init(&begin_cmd, "begin_command"); + performance_counter_init(&build_cmd, "build_command"); + performance_counter_init(&end_cmd, "end_command"); performance_counter_start(&frame_run); video_driver_get_size(&width, &height); @@ -2076,7 +2076,7 @@ static bool vulkan_read_viewport(void *data, uint8_t *buffer) if (staging->memory == VK_NULL_HANDLE) return false; - rarch_perf_init(&stream_readback, "stream_readback"); + performance_counter_init(&stream_readback, "stream_readback"); performance_counter_start(&stream_readback); buffer += 3 * (vk->vp.height - 1) * vk->vp.width; diff --git a/gfx/video_driver.c b/gfx/video_driver.c index d2261af3c6..d77f82091d 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1059,7 +1059,7 @@ static bool video_driver_frame_filter(const void *data, static struct retro_perf_counter softfilter_process = {0}; settings_t *settings = config_get_ptr(); - rarch_perf_init(&softfilter_process, "softfilter_process"); + performance_counter_init(&softfilter_process, "softfilter_process"); if (!video_driver_state.filter.filter || !data) return false; @@ -2052,7 +2052,7 @@ static bool video_pixel_frame_scale(const void *data, { static struct retro_perf_counter video_frame_conv = {0}; - rarch_perf_init(&video_frame_conv, "video_frame_conv"); + performance_counter_init(&video_frame_conv, "video_frame_conv"); if ( !data || video_driver_get_pixel_format() != RETRO_PIXEL_FORMAT_0RGB1555) diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index ff8a7a4644..dea2528337 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -670,7 +670,7 @@ static bool video_thread_frame(void *data, const void *frame_, return false; } - rarch_perf_init(&thr_frame, "thr_frame"); + performance_counter_init(&thr_frame, "thr_frame"); performance_counter_start(&thr_frame); copy_stride = width * (thr->info.rgb32 diff --git a/managers/state_manager.c b/managers/state_manager.c index f4773e06f5..042b36ca15 100644 --- a/managers/state_manager.c +++ b/managers/state_manager.c @@ -572,7 +572,7 @@ recheckcapacity:; goto recheckcapacity; } - rarch_perf_init(&gen_deltas, "gen_deltas"); + performance_counter_init(&gen_deltas, "gen_deltas"); performance_counter_start(&gen_deltas); oldb = state->thisblock; @@ -760,7 +760,7 @@ void state_manager_check_rewind(bool pressed) state_manager_push_where(rewind_state.state, &state); - rarch_perf_init(&rewind_serialize, "rewind_serialize"); + performance_counter_init(&rewind_serialize, "rewind_serialize"); performance_counter_start(&rewind_serialize); serial_info.data = state; diff --git a/performance_counters.c b/performance_counters.c index 1b22e53960..662a6b5252 100644 --- a/performance_counters.c +++ b/performance_counters.c @@ -121,7 +121,7 @@ void retro_perf_log(void) log_counters(perf_counters_libretro, perf_ptr_libretro); } -int rarch_perf_init(struct retro_perf_counter *perf, const char *name) +int performance_counter_init(struct retro_perf_counter *perf, const char *name) { perf->ident = name; diff --git a/performance_counters.h b/performance_counters.h index 6cc0c3f4a5..20e5f17095 100644 --- a/performance_counters.h +++ b/performance_counters.h @@ -57,7 +57,7 @@ void retro_perf_log(void); void rarch_perf_log(void); -int rarch_perf_init(struct retro_perf_counter *perf, const char *name); +int performance_counter_init(struct retro_perf_counter *perf, const char *name); /** * performance_counter_start: