On Fri, Jan 27, 2012 at 9:23 PM, James Snee <james.s...@gmail.com> wrote: > Hi, > > I want to use ftrace's function tracer to monitor the kernel while I > perform various experiments. I decided to start with the emulator and > work towards using a physical device. My problem is, everytime I > enable the function tracer, everything hangs, without output. > > I am using the latest goldfish kernel I could find 2.6.29 and have > built it with ftrace support (in menuconfig (kernel hacking -> tracers > -> Kernel Function Tracer)). I boot it using the emulator and a > standard (api level 9 I think) avd I made, passing the -kernel > parameter. > > I can use the sched_switch tracer without any problems. It's just when > I enable the function tracer (echo function > current_tracer). The > whole thing hangs. > > Any help would be greatly appreciated! > > -- > unsubscribe: android-kernel+unsubscr...@googlegroups.com > website: http://groups.google.com/group/android-kernel
Hi! I've met similar problem on Tegra2 board. After some investigation I realized that ftrace fall into infinite loop because of some mach specific function. I resolved this issue with echoing name of problem function to set_ftrace_notrace. If you think it's your case I suggest locate the problem by bisecting: 1. Get all available filter function by catting available_filter_functions, i.e. cat available_filter_functions > func.txt 2. Split func.txt into two parts, i.e. func1.txt and func2.txt 3. Exclude func1.txt from tracing, i.e. cat func1.txt > set_ftrace_notrace 4. Enable function tracer, i.e. echo function > current_tracer 5. If everything is ok, go to #3 and use func2.txt 6. If it hangs up use the file from #3 as a starting point for #2 Best wishes Vladimir Murzin -- unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel