-mprofile-kernel vs. notrace in ppc64(le) Linux kernels
stewart at linux.vnet.ibm.com
Mon Sep 28 10:08:30 AEST 2015
Torsten Duwe <duwe at lst.de> writes:
> As I mentioned earlier this year, it's a bad idea to call _mcount from
> MMU helper functions (e.g. hash_page...), when the profiling/tracing/
> live-patching/whatever framewok might in turn cause another such fault.
> Jikos suggested to use fine-grained control of these functions with the
> "notrace" keyword in the Linux kernel. It is mapped to GCC's (4.8, FWIW)
> __attribute__((no_instrument_function)), which, to my surprise, works
> for -p and -pg nicely, but does not affect -mprofile-kernel at all!
IIRC from when I was working on GCOV support in OPAL firmware (skiboot),
this doesn't affect the code generated by -fprofile-arcs, so may not
completely do what you want.
More information about the Linuxppc-dev