From 44f0d41089db89b39db16cd43677ba640866a5c1 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Wed, 8 May 2002 21:26:01 +0000 Subject: [PATCH] Yesterday's push/pop merging optimisations break the cache profiler: vg_cachesim.c:536 (vgPlain_cachesim_instrument): Assertion `instr_size >= 1 && instr_size <= 16' failed. so disable them when cache profiling. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@238 --- coregrind/vg_to_ucode.c | 6 ++++-- vg_to_ucode.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/coregrind/vg_to_ucode.c b/coregrind/vg_to_ucode.c index de1c066ad2..e354e93ead 100644 --- a/coregrind/vg_to_ucode.c +++ b/coregrind/vg_to_ucode.c @@ -3714,7 +3714,8 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd ) { Int n_pops; Addr eipS, eipE; UChar ch; - if (sz != 4) goto normal_pop_case; + if (sz != 4) goto normal_pop_case; + if (VG_(clo_cachesim)) goto normal_pop_case; /* eip points at first pop insn + 1. Make eipS and eipE bracket the sequence. */ eipE = eipS = eip - 1; @@ -3823,7 +3824,8 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd ) { Int n_pushes; Addr eipS, eipE; UChar ch; - if (sz != 4) goto normal_push_case; + if (sz != 4) goto normal_push_case; + if (VG_(clo_cachesim)) goto normal_push_case; /* eip points at first push insn + 1. Make eipS and eipE bracket the sequence. */ eipE = eipS = eip - 1; diff --git a/vg_to_ucode.c b/vg_to_ucode.c index de1c066ad2..e354e93ead 100644 --- a/vg_to_ucode.c +++ b/vg_to_ucode.c @@ -3714,7 +3714,8 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd ) { Int n_pops; Addr eipS, eipE; UChar ch; - if (sz != 4) goto normal_pop_case; + if (sz != 4) goto normal_pop_case; + if (VG_(clo_cachesim)) goto normal_pop_case; /* eip points at first pop insn + 1. Make eipS and eipE bracket the sequence. */ eipE = eipS = eip - 1; @@ -3823,7 +3824,8 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd ) { Int n_pushes; Addr eipS, eipE; UChar ch; - if (sz != 4) goto normal_push_case; + if (sz != 4) goto normal_push_case; + if (VG_(clo_cachesim)) goto normal_push_case; /* eip points at first push insn + 1. Make eipS and eipE bracket the sequence. */ eipE = eipS = eip - 1; -- 2.47.2