New profile protocol

- when kernel profiles a process for the first time it saves an entry
  describing the process [endpoint|name]

- every profile sample is only [endpoint|pc]

- profile utility creates a table of endpoint <-> name relations and
  translates endpoints of samples into names and writing out the
  results to comply with the processing tools

- "task" endpoints like KERNEL are negative thus we must cast it to
  unsigned when hashing
This commit is contained in:
Tomas Hruby
2010-09-23 10:49:39 +00:00
parent 123a968be3
commit db12229ce3
6 changed files with 121 additions and 33 deletions

View File

@@ -2,6 +2,7 @@
#define _PROFILE_H
#include <ansi.h>
#include <minix/type.h>
/*
* Types relating to system profiling. Types are supplied for both
@@ -23,10 +24,15 @@ struct sprof_info_s {
} sprof_info_inst;
/* What a profiling sample looks like (used for sizeof()). */
struct {
char name[8];
int pc;
} sprof_sample;
struct sprof_sample {
endpoint_t proc;
void * pc;
};
struct sprof_proc {
endpoint_t proc;
char name[8];
}i;
#endif /* SPROFILE */