aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2010-09-27 00:18:53 -0700
committerArjan van de Ven <arjan@linux.intel.com>2010-09-27 00:18:53 -0700
commit0a21c5e929e5e38aa7055b7f7d337fd290e4f684 (patch)
tree5fec53f9b0bedd55e5303a69905c252cf78974b1
parent5cdc930ef2716ec5030ac0fa8a4b4f284d11f41a (diff)
downloadpowertop-0a21c5e929e5e38aa7055b7f7d337fd290e4f684.tar.gz
account graphics activity to the last guy waking up X
-rw-r--r--TODO17
-rw-r--r--process/do_process.cpp14
-rw-r--r--process/powerconsumer.h1
3 files changed, 29 insertions, 3 deletions
diff --git a/TODO b/TODO
index 12b42f6..2691e9a 100644
--- a/TODO
+++ b/TODO
@@ -1,13 +1,22 @@
* debug why wakeups sometimes go to all 0's
+ -looks like I fixed it, keep an eye on it
* audio calibration? Need appropriate sample
* fix memory leaks
* find out why CPU %age and C state C0 %age don't mesh sometimes
* add device runtime PM stats for pci, spi and i2c
* deal with debugfs not being in /sys/kernel/debug
-* exclude xorg/etc from wakeup blame backcounting
-* GPU ops in interrupt context -> do not account special ?
-
+* network interfaces as device
+* device events/sec into the process view
+* USB urbs as events/sec counter
+* try to see if we can account graphics ops done by X to the guy who woke up
+ X
+* identify kernel threads in the process list for visual differentiation
+* investigate tick_sched_timer and why it wakes up
+* find if we can do more detailed reporting about tasklet(softirq)
+* don't save measurements < 5 seconds
+* auto save every 10 or so measurements
+* check various tunables (see powertop 1.x) into a tunable checklist
done
----
@@ -22,3 +31,5 @@ done
* in learning, try slightly lower base power
* display device power in power top 20
* find out why CPU power and sum of components doesn't add up
+* exclude xorg/etc from wakeup blame backcounting
+* GPU ops in interrupt context -> do not account special ?
diff --git a/process/do_process.cpp b/process/do_process.cpp
index dd56059..ba15312 100644
--- a/process/do_process.cpp
+++ b/process/do_process.cpp
@@ -251,6 +251,8 @@ void perf_process_bundle::handle_trace_point(int type, void *trace, int cpu, uin
if (!dest_proc->running && dest_proc->waker == NULL && we->pid != 0 && !dont_blame_me(we->comm))
dest_proc->waker = from;
+ if (from)
+ dest_proc->last_waker = from;
}
if (strcmp(event_name, "irq:irq_handler_entry") == 0) {
@@ -418,6 +420,18 @@ void perf_process_bundle::handle_trace_point(int type, void *trace, int cpu, uin
consumer = NULL;
}
+
+ /* if we are X, and someone just woke us, account the GPU op to the guy waking us */
+ if (consumer && strcmp(consumer->name(), "process")==0) {
+ class process *proc;
+ proc = (class process *) consumer;
+ if (strcmp(proc->comm, "Xorg")==0 && proc->last_waker) {
+ consumer = proc->last_waker;
+ }
+ }
+
+
+
if (consumer) {
consumer->gpu_ops++;
}
diff --git a/process/powerconsumer.h b/process/powerconsumer.h
index 5a2db8a..f553489 100644
--- a/process/powerconsumer.h
+++ b/process/powerconsumer.h
@@ -20,6 +20,7 @@ public:
int wake_ups;
int gpu_ops;
class power_consumer *waker;
+ class power_consumer *last_waker;
power_consumer(void);