Those are processes, not threads.

On Fri, Sep 2, 2011 at 9:21 AM, Jack Harvard <jack.harv...@gmail.com> wrote:
> Thanks a lot, unfortunately we use BusyBox as the filesystem, the 'top' 
> command options are slightly different,  'top -b' got me something as 
> follows, but would like to get something as you did (suppose you use ps 
> command, i couldn't get exactly the same output as yours, would be nice to 
> have the function names printed out).
>
> Mem: 189324K used, 65772K free, 0K shrd, 864K buff, 78104K cached
> CPU: 50.0% usr  0.0% sys  0.0% nic 50.0% idle  0.0% io  0.0% irq  0.0% sirq
> Load average: 0.18 0.17 0.09 4/298 1085
>  PID  PPID USER     STAT   VSZ %MEM CPU %CPU COMMAND
>  728   727 1000     S     136m 54.7   2  0.0 system_server
> 1027   727 10030    R     128m 51.2   3  0.0 com.android.browser
>  786 727 1001     S    86028 33.6   0  0.0 com.android.phone
>  868   727 10005    S    83568 32.6   0  0.0 android.process.acore
>  960   727 10029    S    83516 32.6   1  0.0 com.android.mms
>  779   727 10012    S    78344 30.6   0  0.0 com.android.inputmethod.latin
>  787 727 1000     S    76668 29.9   1  0.0 com.android.systemui
>  788   727 10020    S    76120 29.7   1  0.0 com.android.launcher
>  932   727 10016    S    73868 28.8   0  0.0 com.android.email
> 1002   727 10027    S    73584 28.7   2  0.0 com.cooliris.media
>  905   727 10003    S    73176 28.5   3  0.0 android.process.media
>  916   727 10006    S    72168 28.1   1  0.0 com.android.deskclock
>  945   727 10025    S    72040 28.1   3  0.0 com.android.providers.calendar
>  985   727 10013    S    71856 28.0   0  0.0 com.android.quicksearchbox
>  899   727 10002    S    71448 27.9   1  0.0 com.android.bluetooth
>  977   727 10008    S    71384 27.8   0  0.0 com.android.music
>  993   727 10014    S    70820 27.6   0  0.0 com.android.protips
>
> On 2 Sep 2011, at 00:11, Dianne Hackborn wrote:
>
>> Many of those probably aren't even browser threads, but threads for Dalvik 
>> and the application framework.  For example, here is a list of threads in my 
>> browser:
>>
>> 1     7035    native  79      21      main
>> *2    7038    vmwait  10      0       GC
>> *3    7040    vmwait  0       0       Signal Catcher
>> *4    7041    running 0       5       JDWP
>> *5    7042    vmwait  13      7       Compiler
>> *6    7043    wait    0       0       ReferenceQueueDaemon
>> *7    7044    wait    0       0       FinalizerDaemon
>> *8    7045    timed-wait      0       0       FinalizerWatchdogDaemon
>> 9     7046    native  0       0       Binder Thread #1
>> 10    7047    native  0       0       Binder Thread #2
>> 11    7057    wait    0       0       pool-2-thread-1
>> 12    7050    native  0       0       CookieSyncManager
>> 13    7056    timed-wait      2       0       pool-1-thread-2
>> 14    7058    native  322     30      WebViewCoreThread
>> 15    7053    native  2       1       BackgroundHandler
>> 16    7054    timed-wait      0       0       pool-1-thread-1
>> 17    7059    wait    1       0       AsyncTask #1
>> 18    7062    native  8       1       TexturesGenerator
>> *19   7063    wait    10      1       Thread-183
>> 20    7067    native  0       0       Thread-185
>> 21    7066    native  6       0       Thread-186
>> 22    7070    wait    10      1       AsyncTask #2
>> 23    7074    native  18      51      Thread-188
>> 24    7076    native  0       0       Thread-189
>> 25    7077    wait    0       0       AsyncTask #3
>> 26    7078    wait    10      1       AsyncTask #4
>> 27    7079    wait    11      0       AsyncTask #5
>>
>> WebViewCoreThread is I believe the main browser thread.  You can easily see 
>> what threads are actually using CPU with "adb shell top -m 10 -t" while you 
>> are using the browser.
>>
>> On Thu, Sep 1, 2011 at 12:15 PM, Jack Harvard <jack.harv...@gmail.com> wrote:
>> Thanks for your reply. I'm on the research side, rather than development. I 
>> observed 17-22 threads from com.android.browser, suppose only one of those 
>> thread is doing the real work of rendering the page.
>>
>> On 31 Aug 2011, at 22:58, Dianne Hackborn wrote:
>>
>> > I really don't know what you are trying to get at.  As I said, as far as I 
>> > know browser CPU use is generally pretty single-threaded -- the DOM 
>> > rendering and JavaScript interpreter all need to run in the same thread.  
>> > Just creating more threads doesn't magically allow this work to be spread 
>> > across them.
>> >
>> > And again, Gingerbread was not written for multi-core CPUs.  In fact if 
>> > you try to run stock GB on a multi-core CPU you will be extremely unstable 
>> > because there are many things not working correctly for SMP, especially 
>> > ARM SMP.  So it doesn't make sense to ask questions about how stock GB 
>> > runs on multi-core, because it just doesn't.
>> >
>> > If you are wondering about a particular phone someone has released with 
>> > GB, you will need to talk with that manufacturer, because they will have 
>> > needed to do some work to have GB run on a multi-core CPU.
>> >
>> > On Wed, Aug 31, 2011 at 2:09 PM, Jack Harvard <jack.harv...@gmail.com> 
>> > wrote:
>> > Thanks for your reply, Dianne. If I run the Android browser as my only 
>> > application in Gingerbread on a quad-core smartphone, and the page to be 
>> > loaded is stored locally in memory (no network delay etc, in this case, 
>> > the browser is single-threaded only as no network connection?), I wouldn't 
>> > see any performance scaling (or worse, as the OS may move the threads to 
>> > another core less busy in a circle) from a single-core smartphone, 
>> > everything else being the same?
>> >
>> > On 31 Aug 2011, at 21:00, Dianne Hackborn wrote:
>> >
>> > > Gingerbread isn't designed for multi-core CPUs.  The browser doesn't try 
>> > > to create threads to use multiple CPUs, it creates threads to have 
>> > > multiple network connections.
>> > >
>> > > Besides networking, browsers are pretty intrinsically single-threaded 
>> > > anyway.  The complicated stuff all needs to run in one thread: DOM 
>> > > rendering, JavaScript, etc.
>> > >
>> > > On Wed, Aug 31, 2011 at 12:08 PM, Jack Harvard <jack.harv...@gmail.com> 
>> > > wrote:
>> > > I want to understand how many threads Gingerbread generates in order to 
>> > > understand how the browser performance scale with multicores? For 
>> > > example, if  "a few " means 2, that means 4 cores wouldn't scale the 
>> > > browser performance by anywhere close to 4 times. I understand that 
>> > > Gingerbread doesn't officially support SMP, sometimes browser does crash 
>> > > on multicore platforms, it's not a problem for me though.
>> > >
>> > > On 31 Aug 2011, at 18:57, Dianne Hackborn wrote:
>> > >
>> > > > Oh and Gingerbread wasn't designed to run on anything but single CPU 
>> > > > systems, so that's irrelevant to the question of the base platform.  
>> > > > Of course people shipping Android modify it in various ways, and the 
>> > > > browser is often one of the things they modify.
>> > > >
>> > > > On Wed, Aug 31, 2011 at 10:57 AM, Dianne Hackborn 
>> > > > <hack...@android.com> wrote:
>> > > > A few.  Why? :)
>> > > >
>> > > >
>> > > > On Wed, Aug 31, 2011 at 10:40 AM, Jack Harvard 
>> > > > <jack.harv...@gmail.com> wrote:
>> > > > Wondering how many threads does android browser generate? Suppose it's 
>> > > > Gingerbread running on a dual-core or quad-core ARM processor.
>> > > >
>> > > > --
>> > > > You received this message because you are subscribed to the Google
>> > > > Groups "Android Developers" group.
>> > > > To post to this group, send email to 
>> > > > android-developers@googlegroups.com
>> > > > To unsubscribe from this group, send email to
>> > > > android-developers+unsubscr...@googlegroups.com
>> > > > For more options, visit this group at
>> > > > http://groups.google.com/group/android-developers?hl=en
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Dianne Hackborn
>> > > > Android framework engineer
>> > > > hack...@android.com
>> > > >
>> > > > Note: please don't send private questions to me, as I don't have time 
>> > > > to provide private support, and so won't reply to such e-mails.  All 
>> > > > such questions should be posted on public forums, where I and others 
>> > > > can see and answer them.
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Dianne Hackborn
>> > > > Android framework engineer
>> > > > hack...@android.com
>> > > >
>> > > > Note: please don't send private questions to me, as I don't have time 
>> > > > to provide private support, and so won't reply to such e-mails.  All 
>> > > > such questions should be posted on public forums, where I and others 
>> > > > can see and answer them.
>> > > >
>> > > >
>> > > > --
>> > > > You received this message because you are subscribed to the Google
>> > > > Groups "Android Developers" group.
>> > > > To post to this group, send email to 
>> > > > android-developers@googlegroups.com
>> > > > To unsubscribe from this group, send email to
>> > > > android-developers+unsubscr...@googlegroups.com
>> > > > For more options, visit this group at
>> > > > http://groups.google.com/group/android-developers?hl=en
>> > >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Android Developers" group.
>> > > To post to this group, send email to android-developers@googlegroups.com
>> > > To unsubscribe from this group, send email to
>> > > android-developers+unsubscr...@googlegroups.com
>> > > For more options, visit this group at
>> > > http://groups.google.com/group/android-developers?hl=en
>> > >
>> > >
>> > >
>> > > --
>> > > Dianne Hackborn
>> > > Android framework engineer
>> > > hack...@android.com
>> > >
>> > > Note: please don't send private questions to me, as I don't have time to 
>> > > provide private support, and so won't reply to such e-mails.  All such 
>> > > questions should be posted on public forums, where I and others can see 
>> > > and answer them.
>> > >
>> > >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Android Developers" group.
>> > > To post to this group, send email to android-developers@googlegroups.com
>> > > To unsubscribe from this group, send email to
>> > > android-developers+unsubscr...@googlegroups.com
>> > > For more options, visit this group at
>> > > http://groups.google.com/group/android-developers?hl=en
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/android-developers?hl=en
>> >
>> >
>> >
>> > --
>> > Dianne Hackborn
>> > Android framework engineer
>> > hack...@android.com
>> >
>> > Note: please don't send private questions to me, as I don't have time to 
>> > provide private support, and so won't reply to such e-mails.  All such 
>> > questions should be posted on public forums, where I and others can see 
>> > and answer them.
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>> --
>> Dianne Hackborn
>> Android framework engineer
>> hack...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time to 
>> provide private support, and so won't reply to such e-mails.  All such 
>> questions should be posted on public forums, where I and others can see and 
>> answer them.
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to