This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] [GDBserver] Fix compiling conditional expressions accessing registers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]