Re: [PATCH 2/8] tracing: create automated trace defines

From: Jeremy Fitzhardinge
Date: Thu Apr 16 2009 - 20:18:53 EST


Mathieu Desnoyers wrote:
Are they? They're generally considered to be "free", because the call and return are predicted 100% accurately.


Adding a simple function call within the tracer fast path, in LTTng, has
a very measurable performance impact on the tbench workload. This is why
I don't use any function call-based trace clocks in LTTng, but rather my
own inline trace clock.

I'm a bit concerned about all the code that tracing puts inline though. It seems it would put quite a lot of icache overhead on the codepath when the tracepoint is disabled, not least because its duplicated in every instance of the tracepoint. And if the compiler decides to put the unlikely() branch code out of line, then that's the same as making it a function call (except that if it is a function call, all the tracepoints will share the same code, and get a higher likelihood of getting icache hits).


J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/