Rename retro_perf_stop

This commit is contained in:
twinaphex 2016-05-16 09:48:14 +02:00
parent 449c7483cd
commit 18355d4748
20 changed files with 43 additions and 45 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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)

View File

@ -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;
}

View File

@ -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();

View File

@ -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)

View File

@ -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;
}

View File

@ -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(&copy_frame);
performance_counter_stop(&copy_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;

View File

@ -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;
}

View File

@ -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)
{

View File

@ -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(&copy_texture_frame);
performance_counter_stop(&copy_texture_frame);
}
}

View File

@ -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);

View File

@ -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();

View File

@ -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(&copy_frame);
performance_counter_stop(&copy_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
{

View File

@ -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;
}

View File

@ -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;

View File

@ -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);
}

View File

@ -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;

View File

@ -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
}