diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2014-01-29 11:12:06 +0100 |
---|---|---|
committer | Markus Metzger <markus.t.metzger@intel.com> | 2015-02-09 09:45:00 +0100 |
commit | 76235df10b96f85815d799b586a6bb32bc89c90f (patch) | |
tree | adc7ee62d5371ed015deb25c96d21681d6dd9096 | |
parent | d33501a51f46193387ff2d101752a9a878202f82 (diff) | |
download | gdb-76235df10b96f85815d799b586a6bb32bc89c90f.zip gdb-76235df10b96f85815d799b586a6bb32bc89c90f.tar.gz gdb-76235df10b96f85815d799b586a6bb32bc89c90f.tar.bz2 |
btrace: update btrace_compute_ftrace parameters
Pass thread_info instead of btrace_thread_info to btrace_compute_ftrace.
We will need the thread_info in subsequent patches.
2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
* btrace.c (btrace_compute_ftrace_bts, btrace_compute_ftrace):
Update parameters. Update users.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/btrace.c | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f3347e9..b0a0908 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2015-02-09 Markus Metzger <markus.t.metzger@intel.com> + * btrace.c (btrace_compute_ftrace_bts, btrace_compute_ftrace): + Update parameters. Update users. + +2015-02-09 Markus Metzger <markus.t.metzger@intel.com> + * btrace.c (parse_xml_btrace_conf_bts): Add size. (btrace_conf_bts_attributes): New. (btrace_conf_children): Add attributes. diff --git a/gdb/btrace.c b/gdb/btrace.c index c7932bb..e96499e 100644 --- a/gdb/btrace.c +++ b/gdb/btrace.c @@ -588,15 +588,17 @@ ftrace_update_insns (struct btrace_function *bfun, CORE_ADDR pc) /* Compute the function branch trace from BTS trace. */ static void -btrace_compute_ftrace_bts (struct btrace_thread_info *btinfo, +btrace_compute_ftrace_bts (struct thread_info *tp, const struct btrace_data_bts *btrace) { + struct btrace_thread_info *btinfo; struct btrace_function *begin, *end; struct gdbarch *gdbarch; unsigned int blk; int level; gdbarch = target_gdbarch (); + btinfo = &tp->btrace; begin = btinfo->begin; end = btinfo->end; level = begin != NULL ? -btinfo->level : INT_MAX; @@ -676,8 +678,7 @@ btrace_compute_ftrace_bts (struct btrace_thread_info *btinfo, a thread given by BTINFO. */ static void -btrace_compute_ftrace (struct btrace_thread_info *btinfo, - struct btrace_data *btrace) +btrace_compute_ftrace (struct thread_info *tp, struct btrace_data *btrace) { DEBUG ("compute ftrace"); @@ -687,7 +688,7 @@ btrace_compute_ftrace (struct btrace_thread_info *btinfo, return; case BTRACE_FORMAT_BTS: - btrace_compute_ftrace_bts (btinfo, &btrace->variant.bts); + btrace_compute_ftrace_bts (tp, &btrace->variant.bts); return; } @@ -718,7 +719,7 @@ btrace_add_pc (struct thread_info *tp) block->begin = pc; block->end = pc; - btrace_compute_ftrace (&tp->btrace, &btrace); + btrace_compute_ftrace (tp, &btrace); do_cleanups (cleanup); } @@ -964,7 +965,7 @@ btrace_fetch (struct thread_info *tp) if (!btrace_data_empty (&btrace)) { btrace_clear_history (btinfo); - btrace_compute_ftrace (btinfo, &btrace); + btrace_compute_ftrace (tp, &btrace); } do_cleanups (cleanup); |