summaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2015-09-10 12:31:36 +0100
committerYao Qi <yao.qi@linaro.org>2015-09-10 12:31:36 +0100
commitdd2e65cc2c48f2fe1343840b610bc6dd4246f35b (patch)
tree345dfb8e500b1ef6733a210f258cae266abdd0b1 /gdb/common
parent55edd97b4b2fb373e7895c449ff439efb6de1509 (diff)
downloadbinutils-gdb-dd2e65cc2c48f2fe1343840b610bc6dd4246f35b.tar.gz
Call target_can_download_tracepoint if there are tracepoints to download
Nowadays, GDB calls target_can_download_tracepoint at the entry of download_tracepoint_locations, which is called by. update_global_location_list. Sometimes, it is not needed to call target_can_download_tracepoint at all because there is no tracepoint created. In remote target, target_can_download_tracepoint send qTStatus to the remote in order to know whether tracepoint can be downloaded or not. This means some redundant qTStatus packets are sent. This patch is to teach GDB to call target_can_download_tracepoint lazily, only on the moment there are tracepoint to download. gdb.perf/single-step.exp (with a local patch to measure RSP packets) shows the number of RSP packets is reduced because there is no tracepoint at all, so GDB doesn't send qTStatus any more. # of RSP packets original patched single-step rsp 1000 7000 6000 single-step rsp 2000 14000 12000 single-step rsp 3000 21000 18000 single-step rsp 4000 28000 24000 gdb: 2015-09-10 Yao Qi <yao.qi@linaro.org> * breakpoint.c (download_tracepoint_locations): New local can_download_tracepoint. Check the result of target_can_download_tracepoint and save it in can_download_tracepoint if there are tracepoints to download. * linux-nat.h (enum tribool): Move it to ... * common/common-types.h: ... here.
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/common-types.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/common/common-types.h b/gdb/common/common-types.h
index 55b41abb8fc..3f60a9a9a56 100644
--- a/gdb/common/common-types.h
+++ b/gdb/common/common-types.h
@@ -58,4 +58,6 @@ typedef unsigned long long ULONGEST;
/* * The largest CORE_ADDR value. */
#define CORE_ADDR_MAX (~ (CORE_ADDR) 0)
+enum tribool { TRIBOOL_UNKNOWN = -1, TRIBOOL_FALSE = 0, TRIBOOL_TRUE = 1 };
+
#endif /* COMMON_TYPES_H */