From: Pedro Alves <palves@redhat.com>
To: Ulrich Weigand <uweigand@de.ibm.com>, Yao Qi <qiyaoltc@gmail.com>
Cc: Pierre Langlois <pierre.langlois@arm.com>,
gdb-patches@sourceware.org, cole945@gmail.com
Subject: Re: [PATCH 1/2] [GDBserver] Fix compiling conditional expressions accessing registers
Date: Wed, 16 Sep 2015 13:54:00 -0000 [thread overview]
Message-ID: <55F97479.9070807@redhat.com> (raw)
In-Reply-To: <20150916115014.0A5EA1DA8@oc7340732750.ibm.com>
On 09/16/2015 12:50 PM, Ulrich Weigand wrote:
> Yao Qi wrote:
>> Pierre Langlois <pierre.langlois@arm.com> writes:
>>
>>> This patch fixes this issue by replacing `gdb_agent_get_raw_reg' with a
>>> `gdb_agent_get_reg' function which takes the tracepoint context object
>>> as argument instead of a raw buffer. Additionally, this patch makes
>>> this function architecture independent by initializing the context's
>>> regcache early and making `gdb_agent_get_reg' use `collect_register'.
>>> As a result, the fast tracepoint context object does not need to
>>> contain the raw register buffer.
>>
>> The fix looks reasonable to me as it makes no sense to keep two copies
>> of registers. I go through this patch, and it looks good to me.
>
> It seems to me this was intended as performance optimization to avoid
> having to do the full regcache setup every time a tracepoint is hit,
> in case we're not actually tracing registers ...
>
> Not sure whether this is a real performance concern for actual use
> cases though. I don't have any actual measurements ...
Yes, I was just now reading this, and was going to say the same.
E.g., the original fast tracepoints code was tuned to avoid as much
work as possible in the condition-fails scenario, when the condition
only accesses a global. That is, e.g., "trace foo if debug_knob == 1".
I no longer have the numbers captured at the time though.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-09-16 13:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 17:25 [PATCH 0/2] " Pierre Langlois
2015-09-11 17:25 ` [PATCH 1/2] " Pierre Langlois
2015-09-16 9:15 ` Yao Qi
2015-09-16 11:50 ` Ulrich Weigand
2015-09-16 13:54 ` Pedro Alves [this message]
2015-09-16 15:03 ` Yao Qi
2015-09-11 17:25 ` [PATCH 2/2] [testsuite] Add test case for tracepoints with conditions Pierre Langlois
2015-09-16 9:19 ` Yao Qi
2015-09-17 8:51 ` Yao Qi
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=55F97479.9070807@redhat.com \
--to=palves@redhat.com \
--cc=cole945@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=pierre.langlois@arm.com \
--cc=qiyaoltc@gmail.com \
--cc=uweigand@de.ibm.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