Messages in this thread |  | | | Date | Thu, 16 Apr 2009 17:18:38 -0700 | | From | Jeremy Fitzhardinge <> | | Subject | Re: [PATCH 2/8] tracing: create automated trace defines |
| |
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
|  |