diff --git a/compiler-rt/lib/memprof/memprof_flags.inc b/compiler-rt/lib/memprof/memprof_flags.inc --- a/compiler-rt/lib/memprof/memprof_flags.inc +++ b/compiler-rt/lib/memprof/memprof_flags.inc @@ -35,7 +35,7 @@ "realloc(p, 0) is equivalent to free(p) by default (Same as the " "POSIX standard). If set to false, realloc(p, 0) will return a " "pointer to an allocated space which can not be used.") -MEMPROF_FLAG(bool, print_text, true, +MEMPROF_FLAG(bool, print_text, false, "If set, prints the heap profile in text format. Else use the raw binary serialization format.") MEMPROF_FLAG(bool, print_terse, false, "If set, prints memory profile in a terse format. Only applicable if print_text = true.") diff --git a/compiler-rt/test/memprof/lit.cfg.py b/compiler-rt/test/memprof/lit.cfg.py --- a/compiler-rt/test/memprof/lit.cfg.py +++ b/compiler-rt/test/memprof/lit.cfg.py @@ -29,12 +29,14 @@ # Platform-specific default MEMPROF_OPTIONS for lit tests. default_memprof_opts = list(config.default_sanitizer_opts) +# Set the default to print text to simplify tests. +default_memprof_opts.append('print_text=true') default_memprof_opts_str = ':'.join(default_memprof_opts) if default_memprof_opts_str: config.environment['MEMPROF_OPTIONS'] = default_memprof_opts_str config.substitutions.append(('%env_memprof_opts=', - 'env MEMPROF_OPTIONS=' + default_memprof_opts_str)) + 'env MEMPROF_OPTIONS=' + default_memprof_opts_str + ':')) # Setup source root. config.test_source_root = os.path.dirname(__file__)