2005-09-15 18:41:39

by Daniel Petrini

[permalink] [raw]
Subject: [PATCH] Timertop - some improvements (3)

Hi,

Here we have a new and cleaned version of timertop. It now uses
seq_file to get a more stable output.

Timertop is a small utility that gets some information to be useful
for dynamic-tick patch, it consists of a kernel patch and a perl
script. The kernel patch gathers information from timer functions ans
stores it in a proc entry (/proc/timer_info).
The perl script parses it and shows in the screen the usage of timer
functions in the system, including the timer count, pid and cmdline of
the processes that started the timer. It shows also the Hz value (idea
from pm-stats).

The idea is to know which applications or drivers are consuming timers
and try to optimize them in order to get lower HZ values and save more
power, at least in theory. So it is applicable over the dyn-tick
patch.

The perl script has this output:

Timer Top v0.9.3
Ticks: 236 HZ
Address Count Freq(Hz) Function PID Command
c011f2b7 |38847164| 444.00| process_timeout|6765 |cpufreq-applet |
c011f2b7 |38847164| 444.00| process_timeout|20327 |timer_top.pl |
c011f2b7 |38847164| 444.00| process_timeout|18304 |firefox-bin |
c01be3b8 |44840 | 4.00| commit_timeout|783 |kjournald |
c011ad7b |5440294 | 172.00| it_real_fn|5572 |Xorg |
c028f061 |323612 | 44.00| neigh_periodic_tim|X | |

Some of the timers, of course, are only related to kernel so there is
nothing in the process (PID and Command) column.

The System.map file must be in the script directory.
The patch should apply over 2.6.13-mm1.

We hope that this can be useful.

We are open to comments, suggestions and review.

Daniel Petrini
---------------------
10LE - Linux
INdT - Manaus - Brazil


Attachments:
(No filename) (1.70 kB)
timer_top4-20050901.patch (5.14 kB)
timer_top.pl (4.76 kB)
Download all attachments