top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

FTrace in Android

0 votes
294 views

I am trying to learn FTrace for Kernel Debugging in Android Platform using JBP ,Kernel 3.4.0 . I am facing a few challenges .

My question --

1) First of all if I checked the available_tracers folder and came to know that I have -

 cat available_tracers
 wakeup_rt wakeup nop

I want to use function tracer , but it is not available in available_tracers list. So how can I use function tracer.??

2) After I succeed in making current_tracer to function , How to use this ? How can I do actual debugging checking by referring trace file..

posted Jun 25, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

3 Answers

+1 vote

First you need configure function tracer in kernel.
AND you need to

echo function > current_tracer
echo 1 > /proc/sys/kernel/ftrace_enabled
echo 1 > tracing_on
echo 1 > tracing_enabled
cat trace
answer Jun 25, 2013 by anonymous
0 votes

Look at the configuration options named CONFIG_FTRACE and CONFIG_*_TRACER.

answer Jun 25, 2013 by anonymous
0 votes

As with other responses, you first need to re-compile the Kernel with support for the function tracer. If you use menuconfig then _most _of the tracing options are in the 'kernel hacking' sub-category. Most importantly in your case you want to enable the function tracer here. When built and booted you can enable the function tracer in the same way as the other tracers.
The trace is written to the 'trace' file and as mentioned by others, you can just cat this to make sure it's being written to.
Remember that FTrace writes into a small ring buffer, which means that traces can be quite short. If you want to trace for longer periods of time I would recommend looking into the trace pipe.

answer Jun 25, 2013 by anonymous
Similar Questions
0 votes

Can anyone suggest the library for Push Notification?

0 votes

Update is installed but status is in pending on App Center. Since sync is alreday called , it won't rollback automatically and also not updating to newer version. The app crashes on startup everytime.

So how to rollback or update to new code push bundle version in this case ?

Here is the sample code:

componentDidMount() { 
codePush.sync(codePushOptions,(status) => {  
switch (status) {    
case codePush.SyncStatus.CHECKING_FOR_UPDATE:
//console.log("Checking for updates.");
break;  
case codePush.SyncStatus.DOWNLOADING_PACKAGE:
//console.log("Downloading package.");
break;   
case codePush.SyncStatus.INSTALLING_UPDATE:
//console.log("Installing update.");
break;  
case codePush.SyncStatus.UP_TO_DATE:
break;  
case codePush.SyncStatus.UPDATE_INSTALLED:         
break;
}
})
throw new Error();
}

Note : I have thrown error to check working of auto rollback.

0 votes

Have you even seen OutOfMemoryError in system server? If yes, how do you find the root case of OOM? Do you have any tools that help finding the root cause in production code or during development?

...