Re: the cost of inlining?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 5, 2014 at 4:32 AM, Jeff Haran <Jeff.Haran@xxxxxxxxxx> wrote:
> Disassembly of section .text:
>
> 0000000000000000 <samp_atomic_read>:
> #include <asm/atomic.h>
> #include <asm/system.h>
>
> int samp_atomic_read(atomic_t *v)
> {
>    0:   55                      push   rbp
>    1:   48 89 e5                mov    rbp,rsp
>    4:   e8 00 00 00 00          call   9 <samp_atomic_read+0x9>
>  *
>  * Atomically reads the value of @v.
>  */
> static inline int atomic_read(const atomic_t *v)
> {
>         return v->counter;
>    9:   8b 07                   mov    eax,DWORD PTR [rdi]
>     int val;
>
>         val = atomic_read(v);
>         return val;
> }
>    b:   c9                      leave
>    c:   c3                      ret
>    d:   90                      nop
>    e:   90                      nop
>    f:   90                      nop

[...]

> But what is that call instruction at offset 4 for?

Looks like you have ftrace enabled in your kernel config, and this call is
a call to _mcount.

-- 
Thanks.
-- Max

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux