Skip to content

Commit

Permalink
Rename retro_perf_stop
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed May 16, 2016
1 parent 449c748 commit 18355d4
Show file tree
Hide file tree
Showing 20 changed files with 43 additions and 45 deletions.
8 changes: 4 additions & 4 deletions audio/audio_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
{
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion audio/drivers/ctr_csnd_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion audio/drivers/ctr_dsp_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion camera/drivers/video4linux2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion dynamic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion gfx/d3d/d3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion gfx/d3d/render_chain_cg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions gfx/drivers/ctr_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
12 changes: 6 additions & 6 deletions gfx/drivers/gl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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;
}

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

Expand Down
4 changes: 2 additions & 2 deletions gfx/drivers/gx_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion gfx/drivers/psp1_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
8 changes: 4 additions & 4 deletions gfx/drivers/sdl2_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion gfx/drivers/sdl_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions gfx/drivers/vg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

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

Expand Down
16 changes: 8 additions & 8 deletions gfx/drivers/vulkan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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. */

Expand Down Expand Up @@ -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);

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

Expand Down Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions gfx/video_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion gfx/video_thread_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions managers/state_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion performance_counters.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions performance_counters.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 18355d4

Please sign in to comment.