45 lines · plain
1//===-- memprof_flags.inc --------------------------------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// MemProf runtime flags.10//11//===----------------------------------------------------------------------===//12#ifndef MEMPROF_FLAG13#error "Define MEMPROF_FLAG prior to including this file!"14#endif15 16// MEMPROF_FLAG(Type, Name, DefaultValue, Description)17// See COMMON_FLAG in sanitizer_flags.inc for more details.18 19MEMPROF_FLAG(bool, unmap_shadow_on_exit, false,20 "If set, explicitly unmaps the (huge) shadow at exit.")21MEMPROF_FLAG(bool, protect_shadow_gap, true, "If set, mprotect the shadow gap")22MEMPROF_FLAG(bool, print_legend, true, "Print the legend for the shadow bytes.")23MEMPROF_FLAG(bool, atexit, false,24 "If set, prints MemProf exit stats even after program terminates "25 "successfully.")26MEMPROF_FLAG(27 bool, print_full_thread_history, true,28 "If set, prints thread creation stacks for the threads involved in the "29 "report and their ancestors up to the main thread.")30 31MEMPROF_FLAG(bool, halt_on_error, true,32 "Crash the program after printing the first error report "33 "(WARNING: USE AT YOUR OWN RISK!)")34MEMPROF_FLAG(bool, allocator_frees_and_returns_null_on_realloc_zero, true,35 "realloc(p, 0) is equivalent to free(p) by default (Same as the "36 "POSIX standard). If set to false, realloc(p, 0) will return a "37 "pointer to an allocated space which can not be used.")38MEMPROF_FLAG(bool, print_text, false,39 "If set, prints the heap profile in text format. Else use the raw binary serialization format.")40MEMPROF_FLAG(bool, print_terse, false,41 "If set, prints memory profile in a terse format. Only applicable "42 "if print_text = true.")43MEMPROF_FLAG(bool, dump_at_exit, true,44 "If set, dump profiles when the program terminates.")45