@@ -54,9 +54,20 @@ enum P4DebugType {
5454 DT_STG, // Tracking storage records.
5555 DT_THREAD, // threading
5656 DT_EXTS, // exts (extension)
57+ DT_PROTECT, // protections stats
58+ DT_HEARTBEAT, // Heartbeat related
59+ DT_SHELVE, // Shelving related
60+ DT_SQW, // StreamQWorker related
61+ DT_TOPOLOGY, // Topology
5762 DT_LAST
5863} ;
5964
65+ enum P4TunableType {
66+ DTT_NONE, // Unknown tuneable
67+ DTT_INT, // Numeric tuneable
68+ DTT_STR, // String tuneable
69+ };
70+
6071extern P4MT int list2[];
6172
6273class P4Tunable {
@@ -71,13 +82,16 @@ class P4Tunable {
7182 list2[t] : list[t].value ;
7283 }
7384 int GetLevel ( const char *n ) const ;
85+ StrBuf GetString ( const char *n ) const ;
86+ StrBuf GetString ( int t ) const ;
7487 int GetIndex ( const char *n ) const ;
7588 const char *GetName ( int t ) const { return list[t].name ; }
7689 int IsSet ( int t ) const { return list[t].isSet ; }
7790 int IsSet ( const char * n ) const ;
7891 int IsKnown ( const char * n );
7992 int IsNumeric ( const char * n );
8093 void IsValid ( const char * n, const char * v, Error *e );
94+ int IsSensitive ( int t ) const { return list[t].sensitive ;}
8195 void Unbuffer ();
8296 void UnsetAll ();
8397
@@ -100,8 +114,16 @@ class P4Tunable {
100114 int modVal;
101115 int k; // what's 1k? 1000 or 1024?
102116 int original;
117+ int sensitive;
103118 } list[];
104-
119+
120+ static struct stunable {
121+ const char *name;
122+ int isSet;
123+ const char *def;
124+ char *value;
125+ int sensitive;
126+ } slist[];
105127} ;
106128
107129typedef void (*DebugOutputHook)( void *context, const StrPtr *buffer );
0 commit comments