Use code cache in aarch64 prologue analyzer
authorYao Qi <yao.qi@linaro.org>
Fri, 9 Dec 2016 09:51:20 +0000 (09:51 +0000)
committerYao Qi <yao.qi@linaro.org>
Fri, 9 Dec 2016 09:51:20 +0000 (09:51 +0000)
This patch change aarch prologue analyzer using code cache, in order
to improve the performance of remote debugging.

gdb.perf/skip-prologue.exp (measured by wall-time) is improved when
the program is compiled without debug information.

Original Patched Original Patched
without dbg without dbg with dbg with dbg

/ 11.1635239124 9.99472999573 9.65339517593 9.66648793221
-fstack-protector-all 11.2560930252 9.338118 9.63896489143 9.59474396706

gdb:

2016-12-9  Yao Qi  <yao.qi@linaro.org>

* aarch64-tdep.c (instruction_reader::read): Call
read_code_unsigned_integer instead of
read_memory_unsigned_integer.

gdb/ChangeLog
gdb/aarch64-tdep.c

index cd5a9eac92c7accbbc02e3264df1c0ebe4c59e49..4b268f58e1292a668cc19a2526b5265216c7bc92 100644 (file)
@@ -1,3 +1,9 @@
+2016-12-09  Yao Qi  <yao.qi@linaro.org>
+
+       * aarch64-tdep.c (instruction_reader::read): Call
+       read_code_unsigned_integer instead of
+       read_memory_unsigned_integer.
+
 2016-12-09  Yao Qi  <yao.qi@linaro.org>
 
        * arm-tdep.c (skip_prologue_function): Call
index 590dcf63144aa091d3f414ecbd11b4f78556f24f..0175630a0b00a29a754e50968b78f566c071d03e 100644 (file)
@@ -213,7 +213,7 @@ class instruction_reader : public abstract_instruction_reader
  public:
   ULONGEST read (CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
   {
-    return read_memory_unsigned_integer (memaddr, len, byte_order);
+    return read_code_unsigned_integer (memaddr, len, byte_order);
   }
 };