summaryrefslogtreecommitdiffstats
path: root/Process.h
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2006-07-11 06:13:32 +0000
committerHisham Muhammad <hisham@gobolinux.org>2006-07-11 06:13:32 +0000
commit5d48ab8c28925f892e8e7f432f7d2b78c86e95c5 (patch)
tree13a209d132be00e28d24f9ce750a873055cfbd98 /Process.h
parent4c41e78bbfe34c67db16bbce8e0241ba583e8572 (diff)
Performance improvement hackathon: improve process comparison routines,
disable useless code in release builds such as runtime type-checking on dynamic data structures and process fields that are not being computed, faster(?) method for verifying the process owner (still need to ensure correctness), don't destroy and create process objects for hidden kernel threads over and over. Phew. I shouldn't be doing all this today, but I could not resist.
Diffstat (limited to 'Process.h')
-rw-r--r--Process.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/Process.h b/Process.h
index 51b11d9a..680b0d4a 100644
--- a/Process.h
+++ b/Process.h
@@ -64,16 +64,19 @@ typedef struct Process_ {
int tty_nr;
int tpgid;
unsigned long int flags;
+ #ifdef DEBUG
unsigned long int minflt;
unsigned long int cminflt;
unsigned long int majflt;
unsigned long int cmajflt;
+ #endif
unsigned long int utime;
unsigned long int stime;
long int cutime;
long int cstime;
long int priority;
long int nice;
+ #ifdef DEBUG
long int itrealvalue;
unsigned long int starttime;
unsigned long int vsize;
@@ -91,6 +94,7 @@ typedef struct Process_ {
unsigned long int wchan;
unsigned long int nswap;
unsigned long int cnswap;
+ #endif
int exit_signal;
int processor;
int m_size;
@@ -107,7 +111,11 @@ typedef struct Process_ {
} Process;
+#ifdef DEBUG
extern char* PROCESS_CLASS;
+#else
+#define PROCESS_CLASS NULL
+#endif
extern char *Process_fieldNames[];
@@ -131,7 +139,9 @@ void Process_sendSignal(Process* this, int signal);
void Process_writeField(Process* this, RichString* str, ProcessField field);
-int Process_compare(const Object* v1, const Object* v2);
+int Process_pidCompare(const void* v1, const void* v2);
+
+int Process_compare(const void* v1, const void* v2);
char* Process_printField(ProcessField field);

© 2014-2024 Faster IT GmbH | imprint | privacy policy