tvlogger.h
3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/*
* tvlogger.h
*
* Unobtrusive settop logging utility. This header file contains structures
* that are used on the settop and server sides.
*
*
* Copyright 1994, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#define TV_LOG_NUM_CODES (8*1024) /* 8K codes */
#define TV_LOG_MAGIC_NUMBER 0xdabebbec
#define TV_LOG_VERSION 2
/*
* Maximum length of string supported by tvLogEventStr.
* Longer strings will be truncated.
*/
#define TV_LOG_MAX_STR_LEN 128
typedef struct {
unsigned long magic;
unsigned long version;
} TVLogHeader;
typedef struct {
unsigned long time;
int tid;
unsigned short code;
unsigned short numargs;
} TVLogEntryHeader;
/*
* Messages 8182-8191 are reserved for the logger. These are defined below.
*/
/*
* The name thread message indicates that a new thread has been spawned,
* and it gives a name to that thread. As many arguments as desired may
* be specified, and they are converted to a string naming the new thread.
* The uldump program can then take this information and convert tid's to
* names.
*
* Use this message as such:
*
* tvLogEvent3 (UL_ENTRY_NAME_THREAD, 3, 'Thre', 'ad n', 'ame');
*
* And the current thread will be named "Thread name". Short names are best
* as they will be printed on every line that contains log entries from the
* current thread.
*/
#define UL_ENTRY_NAME_THREAD 8182
/*
* This message is used for logging thread usage data.
*
* Use this message as such:
*
* TVThreadUsage usage;
*
* tvGetThreadUsage(tvGetThreadID(), &usage);
* tvLogData(UL_ENTRY_THREAD_USAGE, sizeof(usage)/4, &usage);
*
* The print formating of the usage data is defined in tvlog.ul.
*/
#define UL_ENTRY_THREAD_USAGE 8183
/*
* This message is used for logging buffer flushing event for circular buffering.
*/
#define UL_ENTRY_FLUSH_BUFFER 8184
/*
* This message is used for logging event missed.
*/
#define UL_ENTRY_EVENT_MISSED 8185
/*
* Logging of serial numbers. They should be in order.
*/
#define UL_ENTRY_SERIAL_NUMBER 8186
/*
* Events coming from the appmanager describing changes to logging on the
* settop.
*/
/*
* Logging of when a log range gets set
*/
#define UL_LOG_SET_MASK 8187
/*
* Logging of when a log range gets set
*/
#define UL_LOG_CLEAR_MASK 8188
/*
* Logging of when the log gets turned on or off
*/
#define UL_LOG_SET_RATE 8189
/*
* Logging of when the log gets turned on or off
*/
#define UL_LOG_CONTROL 8190
/*
* Logging of the HCT id and the current time so that the daemon
* can cross reference the I.P. address to its local cache. It also
* includes the current time of day so that the RPSS values in the
* log messages sent up to the daemon can be adjusted to the time
* the set-top has.
*/
#define UL_LOG_HCTID_TOD 8191
/*
* That's all folks. Do not pick a number >= 8192
*/