On Tue, 2010-10-19 at 23:07 +0200, Thomas Gleixner wrote:
What? Are you saying that conditional jumps are just as fast as non
conditional ones?
No, when we dynamically enable the tracepoint, it will jump to 25, not
23. That's what the goto part is about. We add the do_trace label to the
table, and we make it point to that location. If we did it as you say,
then tracepoints would never be enabled.
This is not unlike what we do with the function tracer. The original
code points to mcount which simply is:
mcount:
retq
And when we enable the callers, we have it jump to a different function.
That is correct.
Is it still not making sense?
The code worked fine before, it just was not very pretty.
But it seemed that gcc for you inlined the code in the wrong spot.
Perhaps it's not a good idea to have the something like h - softirq_vec
in the parameter of the tracepoint. Not saying that your change is not
worth it. It is, because h - softirq_vec is used by others now too.
-- Steve
--