Lines Matching refs:mcount

37 You will need to implement the mcount and the ftrace_stub functions.
39 The exact mcount symbol name will depend on your toolchain. Some call it
40 "mcount", "_mcount", or even "__mcount". You can probably figure it out by
43 $ echo 'main(){}' | gcc -x c -S -o - - -pg | grep mcount
44 call mcount
46 We'll make the assumption below that the symbol is "mcount" just to keep things
49 Keep in mind that the ABI that is in effect inside of the mcount function is
54 mcount call (before/after function prologue). You might also want to look at
55 how glibc has implemented the mcount function for your architecture. It might
58 The mcount function should check the function pointer ftrace_trace_function
61 the mcount function normally calls __mcount_internal -- the first argument is
63 size of the mcount call that is embedded in the function).
66 mcount(), the arguments mcount() will pass to the tracer are:
69 - "selfpc" - the address bar() (with mcount() size adjustment)
71 Also keep in mind that this mcount function will be called *a lot*, so
73 your system when tracing is disabled. So the start of the mcount function is
86 void mcount(void)
109 Don't forget to export mcount for modules !
112 extern void mcount(void);
113 EXPORT_SYMBOL(mcount);
120 mcount function to check ftrace graph function pointers, as well as implement
123 The mcount function should check the function pointers ftrace_graph_return
141 Here is the updated mcount pseudo code::
143 void mcount(void)
183 that the ABI that applies here is different from what applies to the mcount
257 details for how to locate the addresses of mcount call sites via objdump.
273 - mcount() (new stub)
285 Define MCOUNT_ADDR as the address of your mcount symbol similar to::
287 #define MCOUNT_ADDR ((unsigned long)mcount)
291 extern void mcount(void);
312 did already create a mcount() function earlier, dynamic ftrace only wants a
313 stub function. This is because the mcount() will only be used during boot
315 the guts of the old mcount() will be used to create a new ftrace_caller()
323 void mcount(void)
364 functions. The first is used to turn the mcount call site into a nop (which
366 used to turn the mcount call site into a call to an arbitrary location (but
373 The rec->ip value is the address of the mcount call site that was collected