1 /* $Id: logging.h,v 1.2 1996/06/04 09:01:11 paul Exp $ */
2
3 /*
4 * Events are not recorded for processes that have INVALID_STN as
5 * their sub-task number.
6 */
7 #define INVALID_STN -1
8
9 /*
10 * Message types that can be recorded.
11 */
12 #define EV_TTY_INPUT 1 /* Input characters have been copied to a user */
13 /* process by the tty task. The first event in */
14 /* a task */
15 #define EV_MSG_BLOCK 2 /* A process has blocked waiting to send or receive*/
16 #define EV_MSG_SEND 3 /* A process has just sent a message. */
17 #define EV_MSG_RECV 4 /* A process has just received a message. */
18 #define EV_FORK 5 /* A new proces has been created (always recorded */
19 /* in the system task). */
20 #define EV_EXIT 6 /* A process has terminated. */
21 #define EV_SINK 7 /* A process has finished its involvement with a */
22 /* task (generated by insplit during analysis). */
23 #define EV_NEW_NAME 8 /* A new process name has been specified as the */
24 /* result of an exec system call. */
25
26
27 /*
28 * When an event occurs, an ev_record structure is written to the log file.
29 * Following that record are e_bufflen bytes of event-dependent data.
30 * Currently, three event types have event-dependent data:
31 *
32 * EV_TTY_INPUT: the input characters copied.
33 * EV_MSG_RECV: an integer that contains the type of the message received.
34 * EV_NEW_NAME: a null-terminated string that contains the new process
35 * name.
36 */
37
38 struct ev_record {
39 int e_event; /* One of the event types defined above. */
40 int e_pnr; /* The number of the process in which the event */
41 /* occurred. */
42 int e_stn; /* Sub-task number of the process when the event */
43 /* occurred. */
44 int e_other_stn; /* For "fork"-type events, the sub-task number of */
45 /* the new piece of work (process or message). For */
46 /* "join"-type events, the sub-task number that the */
47 /* process had before the message was received. */
48 int e_secs; /* Time (in seconds and microseconds) at which the */
49 int e_usecs; /* event occurred. */
50 int e_bufflen; /* Number of bytes of event-dependent information. */
51 };
52
53 extern int logging_enabled; /* Global specifying whether logging is enabled */
54
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.