Messages in this thread |  | | | Subject | Re: [PATCH 00/10] jump label: introduce very_[un]likely + cleanups + docs | | From | Steven Rostedt <> | | Date | Wed, 22 Feb 2012 10:12:13 -0500 |
| |
On Wed, 2012-02-22 at 15:56 +0100, Ingo Molnar wrote:
> > Because it really just looks like a stronger "unlikely()" and > > fundamentally it really isn't. [...] > > Well, the fact is that right now it *is* a stronger unlikely() > on architectures that have jump-labels and it's mapped to > unlikely() on others. >
Has gcc been fix to make it truly an unlikely case and remove the "jmp; jmp" problem of before? I'm still using gcc 4.6.0 which has the following code for a tracepoint (example is the trace_sched_migrate_task().
5b4a: e9 00 00 00 00 jmpq 5b4f <set_task_cpu+0x5e>
The above is the jump label that turns into a nop at boot up.
5b4f: eb 19 jmp 5b6a <set_task_cpu+0x79>
Here we jump over some of the trace code (this is the fast path)
5b51: 49 8b 7d 08 mov 0x8(%r13),%rdi 5b55: 44 89 e2 mov %r12d,%edx 5b58: 48 89 de mov %rbx,%rsi 5b5b: 41 ff 55 00 callq *0x0(%r13) 5b5f: 49 83 c5 10 add $0x10,%r13 5b63: 49 83 7d 00 00 cmpq $0x0,0x0(%r13) 5b68: eb 41 jmp 5bab <set_task_cpu+0xba>
Below is the continuation of the fast path.
5b6a: 48 8b 43 08 mov 0x8(%rbx),%rax 5b6e: 44 39 60 18 cmp %r12d,0x18(%rax) 5b72: 74 0c je 5b80 <set_task_cpu+0x8f>
Again, I'm using gcc 4.6.0 and maybe it has been fixed.
-- Steve
|  |