From: Markus Metzger <markus.t.metzger@intel.com>
To: palves@redhat.com
Cc: gdb-patches@sourceware.org
Subject: [PATCH v4 6/9] btrace: update btrace_compute_ftrace parameters
Date: Thu, 05 Feb 2015 15:28:00 -0000 [thread overview]
Message-ID: <1423150072-21229-7-git-send-email-markus.t.metzger@intel.com> (raw)
In-Reply-To: <1423150072-21229-1-git-send-email-markus.t.metzger@intel.com>
Pass thread_info instead of btrace_thread_info to btrace_compute_ftrace.
We will need the thread_info in subsequent patches.
2015-02-05 Markus Metzger <markus.t.metzger@intel.com>
* btrace.c (btrace_compute_ftrace_bts, btrace_compute_ftrace):
Update parameters. Update users.
---
gdb/btrace.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
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);
--
1.8.3.1
next prev parent reply other threads:[~2015-02-05 15:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-05 15:27 [PATCH v4 0/9] record btrace: prepare for a new trace format Markus Metzger
2015-02-05 15:28 ` [PATCH v4 5/9] record-btrace: add bts buffer size configuration option Markus Metzger
2015-02-05 16:25 ` Eli Zaretskii
2015-02-05 15:28 ` [PATCH v4 1/9] btrace: add struct btrace_data Markus Metzger
2015-02-05 15:28 ` [PATCH v4 4/9] record btrace: add configuration struct Markus Metzger
2015-02-05 16:27 ` Eli Zaretskii
2015-02-05 18:31 ` Pedro Alves
2015-02-05 15:28 ` [PATCH v4 9/9] record-btrace: indicate gaps Markus Metzger
2015-02-05 15:28 ` Markus Metzger [this message]
2015-02-05 15:28 ` [PATCH v4 2/9] btrace: add format argument to supports_btrace Markus Metzger
2015-02-05 15:28 ` [PATCH v4 3/9] btrace, linux: add perf event buffer abstraction Markus Metzger
2015-02-05 15:28 ` [PATCH v4 8/9] btrace: identify cpu Markus Metzger
2015-02-05 18:31 ` Pedro Alves
2015-02-05 15:28 ` [PATCH v4 7/9] btrace: extend struct btrace_insn Markus Metzger
2015-02-05 18:33 ` [PATCH v4 0/9] record btrace: prepare for a new trace format Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423150072-21229-7-git-send-email-markus.t.metzger@intel.com \
--to=markus.t.metzger@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox