Lines Matching refs:mcount

31 You will need to implement the mcount and the ftrace_stub functions.
33 The exact mcount symbol name will depend on your toolchain. Some call it
34 "mcount", "_mcount", or even "__mcount". You can probably figure it out by
36 $ echo 'main(){}' | gcc -x c -S -o - - -pg | grep mcount
37 call mcount
38 We'll make the assumption below that the symbol is "mcount" just to keep things
41 Keep in mind that the ABI that is in effect inside of the mcount function is
46 mcount call (before/after function prologue). You might also want to look at
47 how glibc has implemented the mcount function for your architecture. It might
50 The mcount function should check the function pointer ftrace_trace_function
53 the mcount function normally calls __mcount_internal -- the first argument is
55 size of the mcount call that is embedded in the function).
58 mcount(), the arguments mcount() will pass to the tracer are:
60 "selfpc" - the address bar() (with mcount() size adjustment)
62 Also keep in mind that this mcount function will be called *a lot*, so
64 your system when tracing is disabled. So the start of the mcount function is
77 void mcount(void)
100 Don't forget to export mcount for modules !
101 extern void mcount(void);
102 EXPORT_SYMBOL(mcount);
113 variable in the mcount function. If it is non-zero, there is no tracing to be
117 void mcount(void)
133 mcount function to check ftrace graph function pointers, as well as implement
136 The mcount function should check the function pointers ftrace_graph_return
154 Here is the updated mcount pseudo code:
155 void mcount(void)
194 that the ABI that applies here is different from what applies to the mcount
264 details for how to locate the addresses of mcount call sites via objdump.
280 - mcount() (new stub)
292 Define MCOUNT_ADDR as the address of your mcount symbol similar to:
293 #define MCOUNT_ADDR ((unsigned long)mcount)
295 extern void mcount(void);
313 did already create a mcount() function earlier, dynamic ftrace only wants a
314 stub function. This is because the mcount() will only be used during boot
316 the guts of the old mcount() will be used to create a new ftrace_caller()
324 void mcount(void)
370 functions. The first is used to turn the mcount call site into a nop (which
372 used to turn the mcount call site into a call to an arbitrary location (but
377 The rec->ip value is the address of the mcount call site that was collected