Does anyone use the tool "oprofile" in the open source code

by luyen » Tue, 24 Feb 2009 07:22:51 GMT

Sponsored Links
 an user has this question:

Does anyone try the tool "oprofile" in the source code folder
When I use command "oprofile -r start", it will show "Unable to open
cpu_type file for reading Make sure you have done opcontrol --init"
After I finish opcontrol --init, it show the same.
Does I need to set up something first, there is no guide to tell how
to use it.

from: ;catid=22&id=17

Does anyone has the answer?

Does anyone use the tool "oprofile" in the open source code

by Konig.Yuan » Fri, 27 Feb 2009 12:46:49 GMT

 (1) opcontrol --setup, if it failed, the oProfile is not built in
your android kernel.

   you need to enable the CONFIG_OPROFILE=y CONFIG_PROFILING=y

  (2) If the opcontrol --setup successed. cat /dev/oproflie/cpu_type
check whether it is arm/armv6

       Seems google android supports arvm6 by default.

  (3) opcontrol --event TLB_MISS:150000 (you can change the events)

  (4) echo 1 >/dev/oprofile/enable  to start profiling (seems
"opcontrol --start" not work).

  (5) opcontrol --status ,check whether oprofiled is runing or not

  (6) echo 0 >/dev/oprofile/enable to stop the profiling(seems
opcontrol --stop not work).
      Sample data will be collected to /data/oprofile/samples/current/


Sponsored Links

Does anyone use the tool "oprofile" in the open source code

by ATC » Sat, 07 Mar 2009 10:53:19 GMT


I am trying to get OProfile working on Android

I have built the kernel with


However, when I try to run it, it says the oprofiled is not running.
Is there quick way to make sure that oprofiled is running?

# echo 1 >/dev/oprofile/enable

# opcontrol --status

Driver directory: /dev/oprofile

Session directory: /data/oprofile

Counter 0 disabled

Counter 1 disabled

Counter 2 disabled

oprofiled is not running


Other Threads

1. Can't grok Activity life cycle.

I am having a really hard time grokking the Activity life cycle
concept.  The main issue is with onStop() and onDestory() not being
guaranteed to be called before the process is killed.  I though I had
it figured out when I saw that the system calls onSaveInstanceState()
when it's shutting down the activity to claim some memory.  Thing is
that the docs says onSaveInstanceState() will be called before
onPause() but how does the system know at this point whether the
activity will be killed by the system or the user?

Here is a use case:

1) My activity starts up and is running.
2) At some point I want to show a web page so I use an Intent to start
an activity.
3) The web browser covers my app/activity so I would expect onPause()
to be called followed by onStop().

At this point it's my understanding that all bets are off and I can be
killed at any point without be called.

4) Since the system has enough memory onSaveInstance() doesn't get
5) The user presses home and decides to open some app which requires a
lot of memory.
6) System wants more memory and decides to kill my app but I am
already stopped (onPause() has been called).  What happens here?

I am finding this a really serious problem since onPause() pretty much
needs to be treated as onDestory() as far as I can tell. If my app has
to be able to survive being killed without onStop() and onDestory()
being called, why bother having them?


2. Couple questions regarding gestures and system uis

Thanks for the response Mark... So, I'm reading about AsyncTask and
trying to get my head wrapped around how this will all fit together.
And just to make sure I'm not trying to do something that is not
possible with api access.....

I can have a program start up on boot then begin a background thread
that will listen to certain system events and when those events happen
I could send a notification alert (actually, would really like to pop
a dialog box or some other view up over what is currently showing on
the phone's display)

Thanks again,


3. Intent to notify??

4. Couple questions regarding gestures and system uis

5. MovieViewControl unable to become a receiver during Broadcast.

6. How to tell if headphones are plugged in

7. Possible to customize a submenu?