Thread: omap cpu clock
View Single Post
Posts: 1,341 | Thanked: 708 times | Joined on Feb 2010
#11
/sbin/powertop would need to have unlimited sampling time, which could be interrupted with CTRL C.
Now if CTRL C is pressed during the data collecting, it just quits.

The idea would be to let it run and collect statistics after battery is fully charged, until the device's battery is almost empty. Then interrupt and see how much time the device spent in different stages.

edit:
Code:
Nokia-N900-42-11:~# powertop -t 600   
Powertop 1.13.3
status: Unknown job: pmtrackerdaemon
Sleeping for 11 seconds before sampling
Collecting data for 600 seconds
Sample interval was 10m 00s 25696us

C#      | Ratio  | Avg/dura | Frequency | Ratio
--------+--------+----------+-----------+--------+
     C0 |  48.9% |          |   600 MHz |  10.8% |
     C1 |   1.8% |    1.0ms |   550 MHz |   0.2% |
     C2 |  49.3% |    3.0ms |   500 MHz |   3.6% |
     C3 |   0.0% |          |   250 MHz |  85.4% |
     C4 |   0.0% |          | 

IRQ#    | Activity   | Type           | Name
--------+------------+----------------+---------------------------
     61 |     210114 |           INTC | i2c_omap
     37 |      98078 |           INTC | gp
     11 |      85478 |           INTC | prcm
     12 |      62595 |           INTC | DMA
     56 |       9136 |           INTC | i2c_omap
     86 |       3975 |           INTC | mmc1
     57 |       1364 |           INTC | i2c_omap
     21 |        811 |           INTC | SGX
     67 |        427 |           INTC | ssi_p1_mpu_irq0
     71 |        255 |           INTC | ssi_gdd
    260 |        240 |           GPIO | tsc2005
    311 |        148 |           GPIO | ssi_p1_cawake_gpio
    341 |         69 |           GPIO | lis302dl
    225 |         30 |           GPIO | omap2-onenand
    273 |          9 |           GPIO | kb_lock
    261 |          4 |           GPIO | hci_h4p_wkup
     73 |          2 |           INTC | hci_h4p
     25 |          1 |           INTC | OMAP

PID#    | Activity   | Name           | Function Entry (Expire)
--------+------------+----------------+---------------------------
      0 |      75186 |  <kernel core> | tick_nohz_restart_sched_tick (tick_sched_timer)
   1118 |      22113 |    hildon-home | schedule_hrtimeout_range (hrtimer_wakeup)
     37 |       1969D|            awk | cpufreq_governor_dbs (delayed_work_timer_fn)
    798 |        812 |           Xorg | hrtimer_start (it_real_fn)
   1122 |        611 | hildon-desktop | schedule_hrtimeout_range (hrtimer_wakeup)
    680 |        600 |           dsme | __enqueue_rt_entity (sched_rt_period_timer)
   7634 |        399 |      mstardict | schedule_hrtimeout_range (hrtimer_wakeup)
   7085 |        200 |          conky | schedule_hrtimeout_range (hrtimer_wakeup)
    700 |        185 |      bme_RX-51 | sys_timer_settime (posix_timer_fn)
    754 |        119 |     pulseaudio | schedule_hrtimeout_range (hrtimer_wakeup)
    501 |         97 |          mmcqd | queue_delayed_work (delayed_work_timer_fn)
    501 |         89 |          mmcqd | cfq_completed_request (cfq_idle_slice_timer)
    501 |         70 |          mmcqd | schedule_timeout (process_timeout)
   6180 |         60 |         python | schedule_hrtimeout_range (hrtimer_wakeup)
    700 |         57 |      bme_RX-51 | schedule_timeout (process_timeout)
      1 |         52D|  <kernel core> | queue_delayed_work (delayed_work_timer_fn)
    680 |         50 |           dsme | do_nanosleep (hrtimer_wakeup)
    700 |         40 |      bme_RX-51 | do_nanosleep (hrtimer_wakeup)
    733 |         38 |            mce | schedule_hrtimeout_range (hrtimer_wakeup)
     29 |         30 |          mount | setup_wb_timer (wb_timer_fn)
   1122 |         28 | hildon-desktop | OSEnableTimer (OSTimerCallbackWrapper)
    776 |         23 |       sgx_perf | queue_delayed_work (delayed_work_timer_fn)
   6688 |         21 |       browserd | futex_wait (hrtimer_wakeup)
   1115 |         19 |hildon-status-m | schedule_hrtimeout_range (hrtimer_wakeup)
      0 |         17 |  <kernel core> | queue_delayed_work (delayed_work_timer_fn)
    805 |         14 |     pulseaudio | queue_delayed_work (delayed_work_timer_fn)
    747 |         13 |            csd | schedule_hrtimeout_range (hrtimer_wakeup)
   1489 |         12 |        browser | schedule_hrtimeout_range (hrtimer_wakeup)
     15 |         12 |        kswapd0 | schedule_timeout (process_timeout)
   6800 |         12 |        pdflush | blk_plug_device (blk_unplug_timeout)
   1045 |          9 |          iphbd | schedule_hrtimeout_range (hrtimer_wakeup)
   1122 |          8 | hildon-desktop | inet_twsk_schedule (inet_twdr_hangman)
      0 |          7 |  <kernel core> | tsc2005_ts_irq_handler (tsc2005_ts_penup_timer_handler)
   6686 |          6 |       browserd | futex_wait (hrtimer_wakeup)
     15 |          6 |        kswapd0 | blk_plug_device (blk_unplug_timeout)
   1220 |          5 |           icd2 | schedule_hrtimeout_range (hrtimer_wakeup)
    774 |          5 |       gconfd-2 | ubifs_wbuf_write_nolock (wbuf_timer_callback_nolock)
    733 |          5 |            mce | schedule_timeout (process_timeout)
    798 |          5 |           Xorg | OSEnableTimer (OSTimerCallbackWrapper)
      1 |          5 |  <kernel core> | inet_initpeers (peer_check_expire)
      0 |          4 |  <kernel core> | gpio_sw_irq_handler (gpio_sw_timer)
   1184 |          4 |  BatteryGraphd | journal_get_write_access (commit_timeout)
   1144 |          4 |        control | schedule_hrtimeout_range (hrtimer_wakeup)
   1118 |          4 |    hildon-home | journal_get_write_access (commit_timeout)
   7596 |          3 |       browserd | futex_wait (hrtimer_wakeup)
   6800 |          3 |        pdflush | journal_get_write_access (commit_timeout)
   1756 |          2 |            ssh | sk_reset_timer (tcp_write_timer)
   1489 |          2 |        browser | schedule_timeout (process_timeout)
   6685 |          2 |       browserd | schedule_hrtimeout_range (hrtimer_wakeup)
      0 |          2 |  <kernel core> | hrtimer_start (tick_sched_timer)
   6800 |          2 |        pdflush | ubifs_wbuf_write_nolock (wbuf_timer_callback_nolock)
   7598 |          2 |       browserd | futex_wait (hrtimer_wakeup)
   1184 |          2 |  BatteryGraphd | schedule_hrtimeout_range (hrtimer_wakeup)
   6209 |          1 |           sshd | sk_reset_timer (tcp_write_timer)
   7063 |          1 |   BatteryGraph | schedule_hrtimeout_range (hrtimer_wakeup)
   1489 |          1 |        browser | blk_plug_device (blk_unplug_timeout)
   7833 |          1 |            get | sk_reset_timer (tcp_write_timer)
   1025 |          1 |       systemui | schedule_hrtimeout_range (hrtimer_wakeup)
    733 |          1 |            mce | queue_delayed_work (delayed_work_timer_fn)
    733 |          1 |            mce | queue_delayed_work (delayed_work_timer_fn)
    835 |          1 | hald-addon-bme | schedule_hrtimeout_range (hrtimer_wakeup)
   1184 |          1 |  BatteryGraphd | blk_plug_device (blk_unplug_timeout)
   1184 |          1 |  BatteryGraphd | schedule_timeout (process_timeout)
      1 |          1 |  <kernel core> | inet_frags_init (inet_frag_secret_rebuild)
      1 |          1 |  <kernel core> | flow_cache_init (flow_cache_new_hashrnd)
   7644 |          1 |       browserd | journal_get_write_access (commit_timeout)
      1 |          1D|  <kernel core> | rt_secret_timer_init (rt_secret_rebuild)
    710 |          1 |    dbus-daemon | schedule_hrtimeout_range (hrtimer_wakeup)
   7816 |          1 |       powertop | do_nanosleep (hrtimer_wakeup)

Power domain activity breakdown
Domain  | % of time spent in states
--------+---------+---------+---------+---------+----------
usbhost |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)
    sgx |OFF:  95%|RET:   0%|INA:   0%| ON:   4%| now:(OFF)
    per |OFF:   0%|RET:   0%|INA:   0%| ON: 100%| now:(ON)
    dss |OFF:  96%|RET:   0%|INA:   0%| ON:   3%| now:(OFF)
    cam |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)
   core |OFF:   0%|RET:   0%|INA:  43%| ON:  56%| now:(ON)
   neon |OFF:   0%|RET:   0%|INA:  47%| ON:  52%| now:(ON)
    mpu |OFF:   0%|RET:   0%|INA:  48%| ON:  51%| now:(ON)
   iva2 |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)

Clock activity breakdown at end of period
Domain  | Active clocks
--------+---------------+---------------+------------------
   core |          SDRC | HSOTGUSB_IDLE |      OMAPCTRL 
        |     MAILBOXES |
   wkup |          GPT1 |       32KSYNC |         GPIO1 
        |          WDT1 |
  ckgen |          CORE |          PERI |           96M 
        |           48M |           12M |           54M 
        |      EMU_CORE |
    per |        MCBSP2 |         GPIO2 |         GPIO3 
        |         GPIO4 |         GPIO5 |         GPIO6 
        |

Total wakeups  575797, 959.7/s | IRQ 472736, 787.9/s | Timers 103061, 171.8/s
HW wakeups      230,   0.4/s |     Real gp_timers expired   30,   0.1/s
(sorry for lines wrapping over. Next time have to remember to keep fonts small enough so it won't wrap when copying to clipboard.)

Last edited by zimon; 2010-03-26 at 21:14. Reason: just for fun let it collect data for 10min while taking a walk w/ step counter widget