That looks like something that would be useful to figure out how to do. The 
only part that's not immediately clear is "rebuild the entire ALSA library and 
tools with debug symbols. Also, your Kernel must have debug symbols turned on."

Can I do this with RCN's kernel build script setup?

Thanks.

> On Apr 6, 2016, at 18:05 , John Syne <[email protected]> wrote:
> 
> OK, so you have to rebuild the entire ALSA library and tools with debug 
> symbols. Also, your Kernel must have debug symbols turned on. You will need 
> to enable various ftrace features with make config. Here is a typical script 
> I use to capture program flow.
> 
> 
> ===
> #!/bin/bash
> set -x
> 
> pause() {
>  local dummy
>  read -s -r -p "Press any key to continue..." -n 1 dummy
> }
> 
> echo function_graph > /sys/kernel/debug/tracing/current_tracer
> #echo function > /sys/kernel/debug/tracing/current_tracer
> echo 100000 > /sys/kernel/debug/tracing/buffer_size_kb
> echo function-trace > /sys/kernel/debug/tracing/trace_options
> echo latency-format > /sys/kernel/debug/tracing/trace_options
> echo graph-time > /sys/kernel/debug/tracing/trace_options
> echo funcgraph-tail > /sys/kernel/debug/tracing/trace_options
> echo funcgraph-proc > /sys/kernel/debug/tracing/trace_options
> echo funcgraph-abstime > /sys/kernel/debug/tracing/trace_options
> #echo __do_fault > /sys/kernel/debug/tracing/set_graph_function
> echo 1 > /sys/kernel/debug/tracing/tracing_on
> 
> #Insure modprobe statements here if you want to trace the kernel module at 
> startup 
> 
> aplay command
> 
> #Uninstall Kernel module here
> 
> echo 0 > /sys/kernel/debug/tracing/tracing_on
> 
> #cat /sys/kernel/debug/tracing/trace_pipe |grep <filter term> | grep -v 
> "<remove first term>" | grep -v "<remove second term>" > test-trace.txt
> #cat /sys/kernel/debug/tracing/trace_pipe | sed -n '/<term>/p' | sed 
> '/<remove line term>/d' > test-1-trace.txt
> cat /sys/kernel/debug/tracing/trace_pipe > test-2-trace.txt
> ===
> 
> Place this script in your BBB /home/debian folder, then as root, execute 
> ./trace.sh
> 
> Finally, I index the entire linux kernel using a variation of these 
> instructions:
> 
> https://wiki.eclipse.org/HowTo_use_the_CDT_to_navigate_Linux_kernel_source
> 
> To speed things up, you must filter out all the code from other processor 
> architectures and drivers you don’t use. 
> 
> Now I can ctrl click on any term to trace the flow I get from ftrace. For 
> something this complex, I tend to diagram the flow with a mind map or 
> something similar. The visual layout helps me understand the framework 
> architecture. 
> 
> Regards,
> John
> 
> 
> 
> 
>> On Apr 6, 2016, at 5:45 PM, Rick Mann <[email protected]> wrote:
>> 
>> 
>>> On Apr 6, 2016, at 16:53 , Peter Hurley <[email protected]> wrote:
>>> 
>>> If this is a latency problem, ftrace is probably your best bet, but
>>> function_graph and the other tracers can induce even more latency.
>> 
>> Nothing so esoteric. I'm just trying to get the damn thing to work at all. 
>> It's worked in previous kernels, but not in the latest. Seeing what code 
>> gets executed will help a lot. But I'm currently stuck with the default 
>> diagnostics available (e.g. "Unable to set hw params for playback: Invalid 
>> argument" NOT HELPFUL).
>> 
>> In the past, when I spent so much time with printk, I was trying to 
>> understand how all the modules worked together to actually configure and 
>> drive the CODEC. I found that to be virtually impossible to do in any 
>> comprehensive way, not already understanding it. Can't use printk() if you 
>> don't know where to put it.
>> 
>> 
>> -- 
>> Rick Mann
>> [email protected]
>> 
>> 
>> -- 
>> For more options, visit http://beagleboard.org/discuss
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "BeagleBoard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> For more options, visit http://beagleboard.org/discuss
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.


-- 
Rick Mann
[email protected]


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to