mirror of
https://github.com/FunKey-Project/picodrive-irixxxx.git
synced 2026-04-17 08:21:30 +02:00
simple profiler added
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@850 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
@@ -7,6 +7,10 @@ endif
|
||||
ifeq "$(profile)" "2"
|
||||
CFLAGS += -fprofile-use
|
||||
endif
|
||||
ifeq "$(pprof)" "1"
|
||||
DEFINES += PPROF
|
||||
OBJS += platform/linux/pprof.o
|
||||
endif
|
||||
|
||||
# === Pico core ===
|
||||
# Pico
|
||||
|
||||
@@ -1347,6 +1347,8 @@ void emu_init(void)
|
||||
mkdir_path(path, pos, "srm");
|
||||
mkdir_path(path, pos, "brm");
|
||||
|
||||
pprof_init();
|
||||
|
||||
make_config_cfg(path);
|
||||
config_readlrom(path);
|
||||
|
||||
@@ -1373,6 +1375,8 @@ void emu_finish(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
pprof_finish();
|
||||
|
||||
PicoExit();
|
||||
}
|
||||
|
||||
@@ -1432,6 +1436,8 @@ void emu_loop(void)
|
||||
unsigned int timestamp;
|
||||
int diff, diff_lim;
|
||||
|
||||
pprof_start(main);
|
||||
|
||||
timestamp = get_ticks();
|
||||
if (reset_timing) {
|
||||
reset_timing = 0;
|
||||
@@ -1537,7 +1543,7 @@ void emu_loop(void)
|
||||
PicoFrame();
|
||||
pemu_finalize_frame(fpsbuff, notice_msg);
|
||||
|
||||
//plat_video_flip();
|
||||
// plat_video_flip();
|
||||
|
||||
/* frame limiter */
|
||||
if (!reset_timing && !(currentConfig.EmuOpt & (EOPT_NO_FRMLIMIT|EOPT_EXT_FRMLIMIT)))
|
||||
@@ -1560,6 +1566,8 @@ void emu_loop(void)
|
||||
plat_video_flip();
|
||||
|
||||
pframes_done++; frames_done++; frames_shown++;
|
||||
|
||||
pprof_end(main);
|
||||
}
|
||||
|
||||
emu_set_fastforward(0);
|
||||
|
||||
Reference in New Issue
Block a user