summaryrefslogtreecommitdiff
path: root/src/gc/gcpriv.h
diff options
context:
space:
mode:
authorSean Gillespie <segilles@microsoft.com>2017-05-30 17:20:16 -0400
committerSean Gillespie <segilles@microsoft.com>2017-06-01 10:22:06 -0700
commit0834425813497593ceda8bb0ae12dcc463011d7c (patch)
treea3bf07244079e7f8bb07734fa09b7ddabe564ca6 /src/gc/gcpriv.h
parenteb12b78102f2b54dc082caabcd1b59b42166509b (diff)
downloadcoreclr-0834425813497593ceda8bb0ae12dcc463011d7c.tar.gz
coreclr-0834425813497593ceda8bb0ae12dcc463011d7c.tar.bz2
coreclr-0834425813497593ceda8bb0ae12dcc463011d7c.zip
[Local GC] Obtaining configuration information (#11379)
* [Local GC] Skeleton for GC configuration * Initial tweaks after design feedback: 1) Use string keys instead of enums. Upon receiving a string key, the EE looks at it and, if it's something that comes from startup flags, responds using the startup flag information. Otherwise, it forwards the string onto CLRConfig. 2) Add a mechanism for getting string configuration values from the EE. This includes adding a RAII wrapper around strings so that they are freed correctly. * Remove uses of g_pConfig from the GC and replace with GCConfig * Use the GCConfig system for the GC log * Fix poorly-named parameter * Add documentation and caching of bool and int configs obtained from the EE * Remove AppDomainLeaks as dead code * Remove GC trace configs as dead code * Repair unix build * Fix an issue where we started the GC in the wrong latency mode * Fix the unix build * Pipe GCRetainVM configuration to the GC * Dead code removal in the GC sample * EEConfig -> GCConfig for heap verification constants in the GC * Populate config information for bools and ints eagerly at startup * Initialize g_theGCToCLR before initializing GCConfig * Propegate HoardVM config to the GC * Fix an incorrect comment
Diffstat (limited to 'src/gc/gcpriv.h')
-rw-r--r--src/gc/gcpriv.h55
1 files changed, 6 insertions, 49 deletions
diff --git a/src/gc/gcpriv.h b/src/gc/gcpriv.h
index 9f098ebe3b..08fedbbde3 100644
--- a/src/gc/gcpriv.h
+++ b/src/gc/gcpriv.h
@@ -234,46 +234,6 @@ const int policy_compact = 1;
const int policy_expand = 2;
#ifdef TRACE_GC
-
-
-extern int print_level;
-extern BOOL trace_gc;
-extern int gc_trace_fac;
-
-
-class hlet
-{
- static hlet* bindings;
- int prev_val;
- int* pval;
- hlet* prev_let;
-public:
- hlet (int& place, int value)
- {
- prev_val = place;
- pval = &place;
- place = value;
- prev_let = bindings;
- bindings = this;
- }
- ~hlet ()
- {
- *pval = prev_val;
- bindings = prev_let;
- }
-};
-
-
-#define let(p,v) hlet __x = hlet (p, v);
-
-#else //TRACE_GC
-
-#define gc_count -1
-#define let(s,v)
-
-#endif //TRACE_GC
-
-#ifdef TRACE_GC
#define SEG_REUSE_LOG_0 7
#define SEG_REUSE_LOG_1 (SEG_REUSE_LOG_0 + 1)
#define DT_LOG_0 (SEG_REUSE_LOG_1 + 1)
@@ -299,15 +259,12 @@ void GCLog (const char *fmt, ... );
//#define dprintf(l,x) {if ((l==GTC_LOG) || (l <= 1)) {GCLog x;}}
//#define dprintf(l,x) {if (trace_gc && ((l <= print_level) || (l==GTC_LOG))) {GCLog x;}}
//#define dprintf(l,x) {if (l==GTC_LOG) {printf ("\n");printf x ; fflush(stdout);}}
-#else //SIMPLE_DPRINTF
+#else
-// The GCTrace output goes to stdout by default but can get sent to the stress log or the logfile if the
-// reg key GCTraceFacility is set. THe stress log can only take a format string and 4 numbers or
-// string literals.
-#define dprintf(l,x) {if (trace_gc && (l<=print_level)) { \
- if ( !gc_trace_fac) {printf ("\n");printf x ; fflush(stdout);} \
- else if ( gc_trace_fac == 2) {LogSpewAlways x;LogSpewAlways ("\n");} \
- else if ( gc_trace_fac == 1) {STRESS_LOG_VA(x);}}}
+// Nobody used the logging mechanism that used to be here. If we find ourselves
+// wanting to inspect GC logs on unmodified builds, we can use this define here
+// to do so.
+#define dprintf(l, x)
#endif //SIMPLE_DPRINTF
@@ -602,7 +559,7 @@ struct GCStatistics
: public StatisticsBase
{
// initialized to the contents of COMPlus_GcMixLog, or NULL, if not present
- static TCHAR* logFileName;
+ static char* logFileName;
static FILE* logFile;
// number of times we executed a background GC, a foreground GC, or a