add support for steal/guest CPU time measurement

simplify processor data accounting (add CPUData structure)
remove Process_clone trick
This commit is contained in:
Hisham Muhammad
2010-08-24 23:20:38 +00:00
parent c166e172a8
commit 6486229308
13 changed files with 270 additions and 241 deletions

9
CRT.h
View File

@ -14,6 +14,7 @@ in the source distribution for its full text.
#include <signal.h>
#include <stdlib.h>
#include <stdbool.h>
#include <execinfo.h>
#include "String.h"
@ -95,14 +96,16 @@ typedef enum ColorElements_ {
CHECK_MARK,
CHECK_TEXT,
CLOCK,
HELP_BOLD,
HOSTNAME,
CPU_NICE,
CPU_NORMAL,
CPU_KERNEL,
HELP_BOLD,
CPU_IOWAIT,
CPU_IRQ,
CPU_SOFTIRQ,
HOSTNAME,
CPU_STEAL,
CPU_GUEST,
LAST_COLORELEMENT
} ColorElements;
@ -117,6 +120,8 @@ extern int CRT_colors[LAST_COLORELEMENT];
char* CRT_termType;
void *backtraceArray[128];
// TODO: pass an instance of Settings instead.
void CRT_init(int delay, int colorScheme);