ptrace.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. typedef enum PTevent {
  2. SAdmit = 0, /* Edf admit */
  3. SRelease, /* Edf release, waiting to be scheduled */
  4. SEdf, /* running under EDF */
  5. SRun, /* running best effort */
  6. SReady, /* runnable but not running */
  7. SSleep, /* blocked; arg is PSstate| pc<<8 */
  8. SYield, /* blocked waiting for release */
  9. SSlice, /* slice exhausted */
  10. SDeadline, /* proc's deadline */
  11. SExpel, /* Edf expel */
  12. SDead, /* proc dies */
  13. SInts, /* Interrupt start */
  14. SInte, /* Interrupt end */
  15. STrap, /* fault */
  16. SUser, /* user event */
  17. SName, /* used to report names for pids */
  18. Nevent,
  19. } Tevent;
  20. enum {
  21. PTsize = 4 + 4 + 4 + 8 + 8,
  22. /* STrap arg flags */
  23. STrapRPF = 0x1000000000000000ULL, /* page fault (read) STrap arg */
  24. STrapWPF = 0x1000000000000000ULL, /* page fault (write) STrap arg */
  25. STrapSC = 0x2000000000000000ULL, /* sys call STrap arg */
  26. STrapMask = 0x0FFFFFFFFFFFFFFFULL, /* bits available in arg */
  27. /* Sleep states; keep in sync with the kernel schedstate
  28. * BUG: generate automatically.
  29. */
  30. PSDead = 0, /* not used */
  31. PSMoribund, /* not used */
  32. PSReady, /* not used */
  33. PSScheding, /* not used */
  34. PSRunning, /* not used */
  35. PSQueueing,
  36. PSQueueingR,
  37. PSQueueingW,
  38. PSWakeme,
  39. PSBroken, /* not used */
  40. PSStopped, /* not used */
  41. PSRendezvous,
  42. PSWaitrelease,
  43. };
  44. typedef struct PTraceevent PTraceevent;
  45. struct PTraceevent {
  46. u32int pid; /* for the process */
  47. u32int etype; /* Event type */
  48. u32int machno; /* where the event happen */
  49. vlong time; /* time stamp */
  50. u64int arg; /* for this event type */
  51. };