[patch 0/4] [RFC] mcount address adjustment

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

 



This series of patches aims to simplify the mcount address adjustment for
ftrace. The frace code wants to know the start address of each function,
not the address of the relocation against the mcount symbol which have
been recorded to the __mcount_loc section. The ftrace_call_adjust function
is used to calculate the start address of the function from the mcount
relocation at runtime.

For x86, ia64 and s390 the adjustment is a constant offset. There is no
need to do the adjustment at runtime, it can be done by recordmcount at
compile time. Blackfin already does this with the mcount_adjust variable
in the pearl version of recordmcount. After teaching the C version of
recordmcount about mcount_adjust x86, ia64 and s390 can be converted to
a nop ftrace_call_adjust function.

That leaves arm as the last remaining architecture with a non trivial
ftrace_call_adjust function. There the least significant bit is removed
from the address with an and operation. The comment says this is done
for Thumb-2. This implies that for Thumb-1 the offset is 0 and for
Thumb-2 the offset is -1, correct? If there is a way to distinguish
the two targets in recordmcount at compile time we could convert arm
as well. Which would allow us to remove the ftrace_call_adjust function.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux