building again. cool. incidentally, i think it's the changes that needed to be made...
[cpuHistory.git] / CPUMon.taskpaper
blob79ca0f4dd83914ee5cacc6db7d4d660322ce7d3e
1 CPU Mon:
2 - get it to build @done
3 - make another pass through the source to take out extraneous references to CPUUsage @done
4 - check TODOs
5 - how to do data update: make a large float array with my usage data in it, use a rolling pointer to update things. store new data from current cpu stats. @done
6         - is that how the current and last stuff is built? @done
7 - memory leak: vm_deallocate the processorInfo array after use.
8                 if(lastProcessorInfo) {
9                         size_t lastProcessorInfoSize = sizeof(integer_t) * numLastProcessorInfo;
10                         vm_deallocate(target_task, (vm_address_t)lastProcessorInfo, lastProcessorInfoSize);
11                 }
13                 lastProcessorInfo = processorInfo;
14                 numLastProcessorInfo = numProcessorInfo;
16 - in other words, I need to pass the pointer by reference so I can modify its value (ie the memory it points to). keep in mind, someone has to clean up after the old memory.
19 - switch the source of the graph from memory info to CPU info:
20         - first test data coming out of cpu info with logs (this might hurt. limit to one sample every 2 sec)
21         - test with xcode debugger to watch array data change.
22         - then change graphing fct to pull from different data source
25 - remove extraneous information for memory monitor:
26         - paging rate graph
27         - text overlay
28         - preferences form
29 - future upgrades:
30         - CPU usage across processors:
31                 - get # of processors with http://www.cocoadev.com/index.pl?NSProcessInfo
32                 - add another graph or average across both cores?\
34 - ok.
35 - so.
36 - we need a CPUStat array, with [num items].
37         - allocate at init.
38 - then update the applicable entry at update time
39         - then increment and sanity check the pointer