notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
054175e
)
pcnt: measure gte too
author
notaz
<notasas@gmail.com>
Tue, 18 Oct 2011 22:58:04 +0000
(
01:58
+0300)
committer
notaz
<notasas@gmail.com>
Sun, 30 Oct 2011 21:48:07 +0000
(23:48 +0200)
frontend/pcnt.h
patch
|
blob
|
blame
|
history
frontend/plugin.c
patch
|
blob
|
blame
|
history
libpcsxcore/new_dynarec/assem_arm.c
patch
|
blob
|
blame
|
history
libpcsxcore/new_dynarec/emu_if.c
patch
|
blob
|
blame
|
history
diff --git
a/frontend/pcnt.h
b/frontend/pcnt.h
index
3969aa4
..
0213ca1
100644
(file)
--- a/
frontend/pcnt.h
+++ b/
frontend/pcnt.h
@@
-4,13
+4,14
@@
enum pcounters {
PCNT_GPU,
PCNT_SPU,
PCNT_BLIT,
PCNT_GPU,
PCNT_SPU,
PCNT_BLIT,
+ PCNT_GTE,
PCNT_TEST,
PCNT_CNT
};
#ifdef PCNT
PCNT_TEST,
PCNT_CNT
};
#ifdef PCNT
-static const char *pcnt_names[PCNT_CNT] = { "", "gpu", "spu", "blit", "test" };
+static const char *pcnt_names[PCNT_CNT] = { "", "gpu", "spu", "blit", "
gte", "
test" };
#define PCNT_FRAMES 10
#define PCNT_FRAMES 10
@@
-96,6
+97,9
@@
static inline void pcnt_init(void)
#endif
}
#endif
}
+void pcnt_gte_start(int op);
+void pcnt_gte_end(int op);
+
#else
#define pcnt_start(id)
#else
#define pcnt_start(id)
diff --git
a/frontend/plugin.c
b/frontend/plugin.c
index
2492f4a
..
e741a1a
100644
(file)
--- a/
frontend/plugin.c
+++ b/
frontend/plugin.c
@@
-292,4
+292,15
@@
void pcnt_hook_plugins(void)
hook_it(SPU_playCDDAchannel);
}
hook_it(SPU_playCDDAchannel);
}
+// hooked into recompiler
+void pcnt_gte_start(int op)
+{
+ pcnt_start(PCNT_GTE);
+}
+
+void pcnt_gte_end(int op)
+{
+ pcnt_end(PCNT_GTE);
+}
+
#endif
#endif
diff --git
a/libpcsxcore/new_dynarec/assem_arm.c
b/libpcsxcore/new_dynarec/assem_arm.c
index
d0d43f4
..
ddbfafa
100644
(file)
--- a/
libpcsxcore/new_dynarec/assem_arm.c
+++ b/
libpcsxcore/new_dynarec/assem_arm.c
@@
-4410,11
+4410,19
@@
void cop2_assemble(int i,struct regstat *i_regs)
static void c2op_prologue(u_int op,u_int reglist)
{
save_regs_all(reglist);
static void c2op_prologue(u_int op,u_int reglist)
{
save_regs_all(reglist);
+#ifdef PCNT
+ emit_movimm(op,0);
+ emit_call((int)pcnt_gte_start);
+#endif
emit_addimm(FP,(int)&psxRegs.CP2D.r[0]-(int)&dynarec_local,0); // cop2 regs
}
static void c2op_epilogue(u_int op,u_int reglist)
{
emit_addimm(FP,(int)&psxRegs.CP2D.r[0]-(int)&dynarec_local,0); // cop2 regs
}
static void c2op_epilogue(u_int op,u_int reglist)
{
+#ifdef PCNT
+ emit_movimm(op,0);
+ emit_call((int)pcnt_gte_end);
+#endif
restore_regs_all(reglist);
}
restore_regs_all(reglist);
}
diff --git
a/libpcsxcore/new_dynarec/emu_if.c
b/libpcsxcore/new_dynarec/emu_if.c
index
485a7c8
..
b3bcc29
100644
(file)
--- a/
libpcsxcore/new_dynarec/emu_if.c
+++ b/
libpcsxcore/new_dynarec/emu_if.c
@@
-266,7
+266,7
@@
static int ari64_init()
if (psxCP2[i] != psxNULL)
gte_handlers[i] = psxCP2[i];
if (psxCP2[i] != psxNULL)
gte_handlers[i] = psxCP2[i];
-#if !defined(DRC_DBG)
&& !defined(PCNT)
+#if !defined(DRC_DBG)
#ifdef __arm__
gte_handlers[0x06] = gteNCLIP_arm;
gte_handlers_nf[0x01] = gteRTPS_nf_arm;
#ifdef __arm__
gte_handlers[0x06] = gteNCLIP_arm;
gte_handlers_nf[0x01] = gteRTPS_nf_arm;