Skip to content

Commit 9ba0a77

Browse files
committed
rename to -memprof-runtime-default-options
1 parent e632569 commit 9ba0a77

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

compiler-rt/include/sanitizer/memprof_interface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ void SANITIZER_CDECL __memprof_print_accumulated_stats(void);
4747

4848
/// User-provided default option settings.
4949
///
50-
/// You can set these options via the -memprof-default-options LLVM flag or
51-
/// you can provide your own implementation of this function. See
50+
/// You can set these options via the -memprof-runtime-default-options LLVM flag
51+
/// or you can provide your own implementation of this function. See
5252
/// memprof_flags.h for more info.
5353
///
5454
/// \returns Default options string.

compiler-rt/lib/memprof/memprof_flags.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
// prior one:
2323
// 1) by setting MEMPROF_DEFAULT_OPTIONS during the compilation of the MemProf
2424
// runtime
25-
// 2) by setting the LLVM flag -memprof-default-options during the compilation
26-
// of your binary
25+
// 2) by setting the LLVM flag -memprof-runtime-default-options during the
26+
// compilation of your binary
2727
// 3) by overriding the user-specified function __memprof_default_options()
2828
// 4) by setting the environment variable MEMPROF_OPTIONS during runtime
2929

compiler-rt/test/memprof/TestCases/set_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %clangxx_memprof %s -o %t-default
22
// RUN: %run %t-default | FileCheck %s --check-prefix=DEFAULT
33

4-
// RUN: %clangxx_memprof %s -mllvm -memprof-default-options="print_text=true,log_path=stdout,atexit=false" -o %t
4+
// RUN: %clangxx_memprof %s -mllvm -memprof-runtime-default-options="print_text=true,log_path=stdout,atexit=false" -o %t
55
// RUN: %run %t | FileCheck %s
66

77
#include <sanitizer/memprof_interface.h>

llvm/lib/Transforms/Instrumentation/MemProfiler.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ static cl::opt<bool>
167167
cl::Hidden, cl::init(false));
168168

169169
static cl::opt<std::string>
170-
MemprofDefaultOptions("memprof-default-options",
171-
cl::desc("The default memprof options"), cl::Hidden,
172-
cl::init(""));
170+
MemprofRuntimeDefaultOptions("memprof-runtime-default-options",
171+
cl::desc("The default memprof options"),
172+
cl::Hidden, cl::init(""));
173173

174174
extern cl::opt<bool> MemProfReportHintedSizes;
175175

@@ -554,7 +554,7 @@ void createMemprofHistogramFlagVar(Module &M) {
554554

555555
void createMemprofDefaultOptionsVar(Module &M) {
556556
Constant *OptionsConst = ConstantDataArray::getString(
557-
M.getContext(), MemprofDefaultOptions, /*AddNull=*/true);
557+
M.getContext(), MemprofRuntimeDefaultOptions, /*AddNull=*/true);
558558
GlobalVariable *OptionsVar =
559559
new GlobalVariable(M, OptionsConst->getType(), /*isConstant=*/true,
560560
GlobalValue::WeakAnyLinkage, OptionsConst,

llvm/test/Instrumentation/HeapProfiler/memprof-options.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: opt < %s -mtriple=x86_64-unknown-linux -passes='function(memprof),memprof-module' -S | FileCheck %s --check-prefixes=CHECK,EMPTY
2-
; RUN: opt < %s -mtriple=x86_64-unknown-linux -passes='function(memprof),memprof-module' -S -memprof-default-options="verbose=1" | FileCheck %s --check-prefixes=CHECK,VERBOSE
2+
; RUN: opt < %s -mtriple=x86_64-unknown-linux -passes='function(memprof),memprof-module' -S -memprof-runtime-default-options="verbose=1" | FileCheck %s --check-prefixes=CHECK,VERBOSE
33

44
define i32 @main() {
55
entry:

0 commit comments

Comments
 (0)