I have installed Ftrace on android AVD and try to use Ftrace's functionality, but it does not work.
Below is a list of what I did:
- Install ubuntu 10.04 LTS
- Install essential tools such as android sdk, toolchain, libs, etc
- Download goldfish kernel
refer - http://blog.markloiseau.com/2012/07/how-to-compile-the-android-goldfish-emulator-kernel/ - Modify kernel config file (turned on Tracer Options)
- Boot up goldfish with custom kernel which has compiled with tracer options
- Tried to use Ftrace functionality
- The kernel freezes
This is the log:
\# mount -t debugfs nodev /sys/kernel/debug \# ls /sys/kernel/debug sched_features mmc0 tracing bdi \# cd /sys/kernel/debug/tracing \# ls events set_event available_events printk_formats per_cpu options saved_cmdlines trace_marker buffer_size_kb trace_pipe README tracing_thresh tracing_max_latency current_tracer available_tracers trace tracing_cpumask trace_options tracing_enabled tracing_on set_ftrace_pid \# cat available_tracers function_graph function sched_switch nop \# cat current_tracer nop \# echo sched_switch > current_tracer \# cat current_tracer sched_switch \# cat trace | /data/busybox head -10 \# tracer: sched_switch \# \# TASK-PID CPU# TIMESTAMP FUNCTION \# | | | | | bash-258 [000] 490.261240: 258:120:R + [000] 4:115:S events/0 bash-258 [000] 490.262087: 258:120:S ==> [000] 45:120:R adbd adbd-45 [000] 490.262318: 45:120:S ==> [000] 4:115:R events/0 events/0-4 [000] 490.262457: 4:115:R + [000] 43:120:S qemud events/0-4 [000] 490.262492: 4:115:S ==> [000] 43:120:R qemud qemud-43 [000] 490.262643: 43:120:R + [000] 109:112:S er$SensorThread \# echo function > current_tracer *<--- this command occur freeze*
As shown above, some of the features work well. But at the time I turn on the tracking function, a key feature, the system is down.
What should i do ?