Re: [PATCH 2/2] OO tracepoint_action

Yao Qi
2012-03-02T01:06:16Z

On 03/02/2012 09:00 AM, Yao Qi wrote:
> This is the major part of this patch series, which replace several
> switch/case blocks in code with function vectors. It is easier to add
> new operation to tracepoint_action in the future.

This patch is a mechanical refactor change, except in
do_action_at_tracepoint. In GDBserver, we can install
tracepoint_action_ops when creating tracepoint_action objects, however,
in IPA, all tracepoint_actions objects are written from GDBserver. So
when writing tracepoint_actions to IPA, we firstly write field `ops' to
NULL, and check it in do_action_at_tracepoint. If `ops' field is NULL,
install corresponding tracepoint_action_ops instances. The other
approach is to expose the symbols of tracepoint_action_ops instances to
GDBserver, so GDBserver can write it to `ops' field. This approach
exposed too much details of IPA (symbols of tracepoint_action_ops
variables), so I don't use it.

--
Yao (é½å°§)