From: Julian Seward Date: Wed, 8 May 2002 21:26:01 +0000 (+0000) Subject: Yesterday's push/pop merging optimisations break the cache profiler: X-Git-Tag: svn/VALGRIND_1_0_3~226 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44f0d41089db89b39db16cd43677ba640866a5c1;p=thirdparty%2Fvalgrind.git 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 --- 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;