Backport time tracking fix from NewOS:

thread code now properly traces time spent in user vs kernel mode. The code was
just plain broken before
http://www.newos.org/cgi-bin/perfbrowse.perl?@describe+1704


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2599 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin
2003-01-29 21:59:37 +00:00
parent 1241a21542
commit f3eabb6abd
3 changed files with 18 additions and 3 deletions
+6 -1
View File
@@ -44,6 +44,10 @@ enum team_state {
TEAM_STATE_DEATH // being killed
};
enum {
KERNEL_TIME,
USER_TIME
};
#define THREAD_RETURN_EXIT 0x1
#define THREAD_RETURN_INTERRUPTED 0x2
@@ -129,7 +133,8 @@ struct thread {
bigtime_t user_time;
bigtime_t kernel_time;
bigtime_t last_time;
int last_time_type; // KERNEL_TIME or USER_TIME
// architecture dependant section
struct arch_thread arch_info;
};